百度编辑器修改
在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;
}
可以解决 图片目录创建失败
上一篇: if语句
下一篇: css的再深入8(更新中···)