userid)){}" in the file."/> userid)){}" in the file.">

Home  >  Article  >  CMS Tutorial  >  What to do if phpcms v9 cannot upload thumbnails

What to do if phpcms v9 cannot upload thumbnails

藏色散人
藏色散人Original
2020-02-03 11:04:302476browse

What to do if phpcms v9 cannot upload thumbnails

What should I do if phpcms v9 cannot upload thumbnails? Solution to the problem of Phpcms V9 thumbnail upload failure

I am using the latest version of Phpcms V9.4.2 to build a conference company website, and I suddenly found the thumbnail of the background article near the end. Thumbnail image cannot be uploaded!

It works normally when selecting a file. When I click to start uploading, the above information window "undefined" suddenly pops up when the upload is almost completed.

For phpcms v9, I have installed it N times, and this is the first time this problem has occurred. I am really dizzy. This situation occurs at this critical moment when every second counts.

Based on my intuition, there may be three problems:

1. The server uses the Linux system

2. The latest version of phpcms is used

3. There is an error in a certain file when uploading the installation package

I usually troubleshoot problems in order from simple to complex.

In order to eliminate the first situation, I installed an early version of phpcms v9 and tested it. Everything was normal. For the remaining problems, I re-uploaded the installation package to confirm that there would be no file errors during the transfer process. After testing, The problem occurs in the latest version of Phpcms V9.4.2. It is most normal for "BUG" to appear in the latest version of the program.

With the problem, I followed the clues and finally found the solution in the Phpcms V9 official forum:

1. Open the phpcmsmodulesattachmentattachments.php file

2. From line 50 Start by deleting the following code. The code is as follows:

if(emptyempty($this->userid)){  
        exit('0');  
}

The official reason is: this is to determine that uploading can only be done after logging in. If you log in as a super administrator, this value will be empty, so it will prompt Error undefined.

PHP Chinese website, a large number of free PHPCMS tutorials, welcome to learn online!

The above is the detailed content of What to do if phpcms v9 cannot upload thumbnails. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn