欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

百度编辑器修改

程序员文章站 2022-07-02 15:35:39
在PHP文件加下Uploader.class.php 中搜索下面方法 /** * 获取文件完整路径 * @return string */ private function getFilePath() { $fullname = $this->fullName; if(empty($_SERVER[ ......

 在php文件加下uploader.class.php 中搜索下面方法

 

/**
* 获取文件完整路径
* @return string
*/
private function getfilepath()
{
$fullname = $this->fullname;

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'];

if (substr($fullname, 0, 1) != '/') {
$fullname = '/' . $fullname;
}

return $rootpath . $fullname;
}

可以解决 图片目录创建失败