Solution to Discuz unable to upload images in PHP IIS environment_PHP tutorial

WBOY
Release: 2016-07-13 10:30:27
Original
1099 people have browsed it

My PHP has just been configured. After configuring it, I downloaded and installed Discuz!, but I didn’t expect that I couldn’t upload pictures. Then I also tried other Php programs, but I couldn’t upload pictures either. I’m sure it’s not a problem with the program. There must be something wrong with my PHP configuration. My PHP is configured in IIS environment.

Later, Baidu searched and found the problem. Let’s talk about how to solve the problem of not being able to upload pictures.

1. Open the php.ini file, find the upload_tmp_dir line, remove the previous comment, and modify it to the following line:

upload_tmp_dir = D:temp

2. The above means to set up a temporary directory for uploading. This directory requires writable permissions. Please confirm that D:temp exists, otherwise you will not be able to upload images. Under normal circumstances, we create the temp temporary directory in the root directory of PHP so that it will not be deleted accidentally. Please pay attention to adding a user starting with IUER, that is, adding writable permissions to the IIS user.

3. Restart iis

4. Now you can log in to the discuz backend, click "Tools -> Update Cache", upload pictures, and it's normal!

Usually this is a newly configured server and you forget to configure permissions. This problem is prone to occur. Please remind me again.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/765437.htmlTechArticleI just configured PHP. After configuring it, I downloaded and installed Discuz!. I didn’t expect that I couldn’t upload pictures. Later, I downloaded and installed Discuz! I also tried other Php programs, but I couldn't upload pictures either. I'm sure it's not a problem with the program...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template