The Baidu editor I used is 1.4.2, which is relatively new compared with the current time. A path problem occurs after the previous version of 1.3 is updated to 1.4. This evening, I encountered a special strange problem, so I made a special round again and found that this thing had to be done by myself. The problem tonight is that the Local Computer win7 can be uploaded normally, the online centos can be uploaded normally, the testing machine is iOS, And the upload can be normal a few days ago. I don't know what's going on tonight, the file upload directory, it is strange to confirm that it is not a permission issue.
# This is the root directory of the Baidu editor. For security concerns, you can only write absolute paths in the host format of http: //... and cannot expose the root directory/XXX/xxx of your project. No one said this in the online tutorial. The Sina supervisor said that the root directory of the Website Cannot be exposed on the front end.
Window. umeditor_home_url = $ config ['domain '] + "/RES/local/JS/ueditor /";// Note that it is here!
# It makes sense to define the first definition. You can use the method that comes with the editor if it is not defined.
Window. ueditor_config.imageurl = $ config ['domain '] +'/goodspic? Type = 2 ';
# Uploading the text displayed in the directory area is not a path, but a path alternative.
Window. ueditor_config.savepath = ['upload'];
# Image Correction address: the folder to which the image is uploaded and the path of the image file displayed on the foreground. The upload path address written in PHP must be consistent with the image display path address to ensure access.
Window. ueditor_config.imagepath = $ config ['domain '] +'/RES/local/uploads /';
# Call method.
UE. geteditor ('addarea ')
The most important thing is 1, 2, 4. Now that you understand these three points, you can use the ueditor.
Image address correction of Baidu editor ueditor