一、在后台打开百度的编辑器显示下图
二、访问UEditor富文本编辑器以下这个文件 /ueditor/php/controller.php 是否返回以下
三、再次访问UEditor富文本编辑器 /ueditor/php/controller.php?action=config 返回以下错误
出现在以上三个问题,可以确认是UEditor富文本编辑器 /ueditor/php/controller.php 这个文件下的这个
$CONFIG = json_decode(preg_replace("//*[\s\S]+?*//", “”, file_get_contents(“config.json”)), true);
引入config.json路径错误造成的
修改如下
$CONFIG = json_decode(preg_replace("/\/\*[\s\S]+?\*\//", "", file_get_contents($_SERVER['DOCUMENT_ROOT']."/public/static/ueditor/php/config.json")), true);
$_SERVER[‘DOCUMENT_ROOT’]."/public/static/ueditor/php/config.json" 是config.json这个文件的绝对路径