phpcms v9 upgrade background can not upload the thumbnail analysis of the reasons

Source: Internet
Author: User
Tags aliyun analysis browser cms cms system error exit firefox

Intermediary trading http://www.aliyun.com/zixun/aggregation/6858.html"> SEO diagnostic Taobao customer hosting technology hall

phpcms V9 is currently the largest number of open source free CMS system, it is precisely because of his free, open source, and its more powerful, so much the owners of many webmasters, and Many companies like it. phpcms also in order to improve the loopholes in the program, the official staff will regularly release some program patches, allowing users to use. To prevent some special groups, through the loopholes in the program to attack other people's Web site. However, this update phpcms v9, found the website backstage upload thumbnails, there will be unable to upload the phenomenon, the browser prompt undefined error, after one test, found this error, only some of the core Firefox browser Appear, IE, 360 this IE core browser upload everything is normal. This is what causes it, we check through the procedure why the background can not upload thumbnails, and undefined error.

A, phpcms V9 background can not upload thumbnails approach

First open the web site program path, phpcms --- modules ---- attachment ---- attachments.php file to find the attachments.php file in the 50 line --- 53 lines of code, there is a period of judgment is logged Program, we delete this passage on it. as the picture shows

By removing a very simple paragraph, you can solve similar Firefox core browser, the background can not upload thumbnails error. Next, we analyze in detail why this sentence, it will lead to the background can not upload thumbnails, then if you encounter the above program error, you can also analyze the following methods, we must learn to use flexibly, the program is dead , And our programmer's thinking is flexible.

Note: If you are not interested in why you can not upload thumbnail errors, the following can be skipped!

Second, phpcms V9 background can not upload the thumbnail analysis of the reasons

Now that you know the reason for this, let's see why this sentence led to the inability to upload thumbnails.

if (isset ($ _ POST ['dosubmit'])) {// Determine if the submit button was clicked

// determine whether to log in

if (empty ($ this-> userid)) {// If useid is null, exit directly. (The $ this finger class itself is made by the attachments class in the constructor.)

exit ('0');

}

Since it is to determine the userid is empty to exit, then we can not upload thumbnails, is certainly judged to be empty. Let's take a look at the $ this-> userid output.

Can be seen from the figure, the output is 1, which means $ this-> userid is 1, 1 is definitely not a null value. How can there be a withdrawal phenomenon? Let's test another method and see

if (empty ($ this-> userid)) {

exit ('0');

}

Is this sentence implemented?

// determine whether to log in

if (empty ($ this-> userid)) {

echo '';

exit ('0');

} else {

echo '';

}

as the picture shows:

We saw that the program did indeed, out of the action. It seems the core Firefox browser or "1" as empty to deal with, resulting in, phpcms V9 Firefox core browser, the background can not upload thumbnail phenomenon. \

Jinan website construction www.0531soso.com

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.