Admin address, in the background-"settings-" Related Settings-"Security settings inside a two-level domain name as a management address, and modify caches/configs/system.php under the ' Admin_url ' => ' admin. primary domain. com ' Allow access to background domain names
After careful analysis found that the bug, first in accordance with the official set up the management of a special two-level domain name, the other domain name access to the background management will appear without permission to visit the prompt, will not upload pictures when the call editor address is still used in system.php inside ' app_path ' => ' http://www. primary domain name. com/', the generated address, so upload pictures, will appear when the upload page does not have permission to die, through a netizen posted on the website of the blog, confirmed that this is really the result of the bug, is when the administrator set up a dedicated domain name management, The editor used in the background is still using the editor of the main domain name, so it does not have permission to upload attachments and pictures.
Solutions
Method 1
Do not use a dedicated two-level domain management background, open permissions. Everything's OK.
Method 2
Is tangled must use the specialized two level domain name management backstage.
The code is as follows |
Copy Code |
1, modify system.php in ' App_path ' => ' http://www. main domain name. com/' Add a line below ' Up_path ' => ' http://cp.dzhaofang.com/',//background domain name configuration address 2, modify/phpcms/base.php |
Add the following code
code is as follows |
copy code |
//Background CKEditor address define (' Up_path ', pc_base::load_config (' System ', ' Up_path ')); 3. Modify/phpcms/libs/classes/form.class.php To $str the if ($allowupload). = "Filebrowseruploadurl: '". App_path. " Index.php?m=attachment&c=attachments&a=upload&module= ". $module." &catid= ". $catid." &dosubmit=1 ', RN '; Change to The if ($allowupload) $str. = "Filebrowseruploadurl: '". Up_path. " Index.php?m=attachment&c=attachments&a=upload&module= ". $module." &catid= ". $catid." &dosubmit=1 ', RN '; |
Install Phpcms V9 (Destoon, etc.) in the DEDEAMPZ environment can not upload the image method
Use Destoon to do a website, the results found that no matter what, is not in the background can upload pictures, thumbnails are also, but the network address picture can be.
Later on the Internet to find information, found that there are many people have such a problem.
Finally in an article found that there are solutions, but too messy, their own groping a bit, the results were successfully resolved.
is actually changing the php.ini settings.
The code is as follows |
Copy Code |
Upload_tmp_dir = "D:/dedeampz/tmp/uploads" Session.save_path = "D:/dedeampz/tmp/sessions" |
I set both folders to the root of my web site and set the user permission to write.
The code is as follows |
Copy Code |
Upload_tmp_dir = "D:/dedeampz/webroot/xxx.com/tmp/uploads" Session.save_path = "D:/dedeampz/webroot/xxx.com/tmp/sessions" |
When the settings are complete, restart Apache.