Home  >  Article  >  Backend Development  >  What to do if images cannot be displayed in iis php

What to do if images cannot be displayed in iis php

藏色散人
藏色散人Original
2020-09-03 09:18:082461browse

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!

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