Using the Ueditor Editor, the attachment defaults to ueditor/php/upload/, my attachment address is/data/upload/under the site root directory, and needs to be modified Ueditor as follows:
The first step: Open php/config.php Modify the picture directory
Copy Code code as follows:
Return Array (
Picture Catalogue
' Imagesavepath ' => Array (
'.. /.. /.. /.. /data/upload '
)
);
Step two: Picture upload and remove relative path php/imageup.php
Copy Code code as follows:
$info [url]]=str_replace ('. /.. /.. /.. /', ', $info ["url"]);
echo "{' URL ': '". $info [url]. "', ' title ': '. $title. "', ' original ': '". $info ["Originalname"]. "', ' state ': '. $info ["state"]. "'}";
Exit
Step Three: Open ueditor.config.js Modify Picture path
Copy Code code as follows:
Fourth step: If you want to modify the picture generation path or picture name
Modify picture generation path in php/uploader.class.php
Copy Code code as follows:
Private Function GetFolder ()
{
$PATHSTR = $this->config["Savepath"];
if (STRRCHR ($PATHSTR, "/")!= "/") {
$pathStr. = "/";
}
$pathStr. = Date ("ym/d");
if (!file_exists ($PATHSTR)) {
if (!mkdir ($pathStr, 0777, True)) {
return false;
}
}
return $pathStr;
}
Modify the filename, search for "Filenameformat" in Ueditor.all.min.js, and then modify it according to the Official document description!