In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article is about solving the problem of unsuccessful uploading of phpcms attachments. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
What if the upload of phpcms attachment is not successful?
The first solution: modify the apache configuration file directly. Modify the php.ini file (this method is only applicable to VPS, stand-alone servers, or locally built environments, but not to virtual hosts, which is for reference only).
Change; extension=php_zip.dll to: extension=php_zip.dll. (that is, remove the previous code)
The second solution: modify the attachment.class.php file.
Put $this- > upload_func = 'copy'
Change to $this- > upload_func = 'move_uploaded_file'
Warm Tip: this method may make it impossible to automatically save pictures remotely.
The third solution: modify the code file. Locate the phpcms\ modules\ attachment\ attachments.php file.
Put the following code:
If (empty ($this- > userid)) {
To be replaced by:
If (empty ($_ POST ['userid'])) {
Save the upload overlay before it can be solved. This method is submitted with the privileges of the administrator.
The fourth solution: annotation code method. Locate the phpcms\ modules\ attachment\ attachments.php file.
About 50-54 lines of code are commented out. The specific commented code is as follows:
/ / determine whether to log in to If (empty ($this- > userid)) {exit ('0');}
Delete or comment out these lines of code for the time being. Here is to determine the login before uploading. Otherwise, the return is a zero exit, which means undefined.
The above four are the four perfect solutions for phpcms when uploading pictures or attachments that prompt undefined.
Thank you for reading! So much for solving the problem of unsuccessful upload of phpcms attachments. I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.
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.