百度编译器ueditor目录创建失败问题解决

修改ueditor编辑器的文件Uploader.class.php
 
例如:
vim protected/widget/ueditor/php/Uploader.class.php
 

:283

 

 

if(empty($_SERVER['DOCUMENT_ROOT']) && !empty($_SERVER['SCRIPT_FILENAME'])) {
        $_SERVER['DOCUMENT_ROOT'] = str_replace( '\/', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0 - strlen($_SERVER['PHP_SELF'])));
}
if(empty($_SERVER['DOCUMENT_ROOT']) && !empty($_SERVER['PATH_TRANSLATED'])) {
        $_SERVER['DOCUMENT_ROOT'] = str_replace( '\/', '/', substr(str_replace('\\/', '\/', $_SERVER['PATH_TRANSLATED']), 0, 0 - strlen($_SERVER['PHP_SELF'])));
}

 

 

 
$rootPath = $_SERVER['DOCUMENT_ROOT'];
在这句的上面添加上面代码

posted @ 2019-09-25 10:32  ToDarcy  阅读(1534)  评论(0编辑  收藏  举报