In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to solve the problem that phpcms v9 cannot upload pictures. It has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
What if phpcms v9 cannot upload pictures?
The solution that PHPCMS V9 cannot upload pictures
The PHPCMS V9 editor cannot upload the picture. As soon as I check it, it uses a secondary domain name. This may be the reason why the picture cannot be uploaded. Let's analyze the reasons below.
For the management address, enter a secondary domain name as the management address in the "Settings-related Settings -" security settings, and modify 'admin_url' = >' admin. Primary domain name .com 'under caches/configs/system.php, and / / allow access to the backend domain name.
After careful analysis, it is found that BUG, after first setting up the second-level domain name dedicated to the management background in accordance with the official settings, the other domain name access background management will be prompted that there is no permission to access, and the editor address called when the picture will be uploaded will still use the 'app_path' = >' http://www. in system.php. The main domain name .com /', the generated address, so that when uploading pictures, the opening page will be stuck without permission. Through a blog posted by netizens on the website, it is confirmed that this is the generation of BUG, that is, when the administrator has set up a dedicated management domain name, the editor used in the background is still using the editor called by the main domain name, so there is no permission to upload attachments and images.
Solution.
Method 1
Do not use a dedicated second-level domain name to manage the background and release the permissions. Everything ok.
Method 2
It is entangled that the background must be managed with a dedicated second-level domain name.
1. Modify system.php and add a line under 'app_path' = >' http://www. primary domain .com /'.
'up_path' = >' http://cp.a.com/',// backend domain name configuration address
2. Modify / phpcms/base.php and add the following code
The code is as follows:
/ / backend CKEditor address define ('UP_PATH',pc_base::load_config (' system','up_path'));
3. Modify / phpcms/libs/classes/form.class.php
Set
[code] if ($allowupload) $str. = "filebrowserUploadUrl:'" .app _ PATH. "index.php?m=attachment&c=attachments&a=upload&module=". $module. "& catid=". $catid. "& dosubmit=1',rn"
Change to
[code] 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.) cannot upload pictures in DeDeAMPZ environment
Using Destoon to make a website, it turns out that no matter what, you can't upload pictures in the background, nor can thumbnails, but network address pictures can.
Later, when I searched for information on the Internet, I found that many people also had such a problem.
Finally, I found a solution in an article, but it was too messy. I fumbled for it and solved it successfully.
The code is as follows:
Upload_tmp_dir = "D:/DedeAMPZ/tmp/uploads" session.save_path = "D:/DedeAMPZ/tmp/sessions"
I set both folders to the root of my website and set user permissions to be writable.
The code is as follows:
Upload_tmp_dir = "D:/DedeAMPZ/WebRoot/xxx.com/tmp/uploads" session.save_path = "D:/DedeAMPZ/WebRoot/xxx.com/tmp/sessions"
After setting up, be sure to restart Apache or iis.
Thank you for reading this article carefully. I hope the editor will share the content to solve the problem that phpcms v9 cannot upload pictures. At the same time, I also hope you can support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.