百度编辑器修改
在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;
}
可以解决 图片目录创建失败
上一篇: 使用JQuery完成省市联动效果
下一篇: 简单介绍一下,PHP版本的区别