What to do if images cannot be displayed in iis php

藏色散人
Release: 2023-03-05 16:58:02
Original
2375 people have browsed it

The solution to the problem that iis php pictures cannot be displayed: 1. Set a temporary directory for the "upload_tmp_dir" item in "php.ini" and set the corresponding permissions; 2. Change "C:\Windows\Temp "Add the corresponding permissions to the directory.

What to do if images cannot be displayed in iis php

Recommended: "PHP Video Tutorial"

PHP images uploaded in Windows IIS 401 cannot be accessed The solution

When the project went online today, I found that the uploaded pictures could not be displayed normally. A 401 permission issue was reported. Here is the solution.

What to do if images cannot be displayed in iis php

Summary of the problem:

Under the Windows platform, if PHP uses IIS, when uploading files, PHP will first upload the files to a temporary directory.

(This configuration item can be found in php.ini Configure in " upload_tmp_dir ". Since our server has not been configured, php will use the system's temporary directory "C:\Windows\Temp" ).

Solution:

1. Set a temporary directory for the upload_tmp_dir item in php.ini and set the corresponding permissions (recommended method)

2. Add corresponding permissions to the "C:\Windows\Temp" directory

Important note:

The upload_tmp_dir directory permissions of php.ini must include IUSER and IIS_IUSERS permissions or Everyone

The above is the detailed content of What to do if images cannot be displayed in iis php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!