What should I do if the picture written in php does not display?

藏色散人
Release: 2023-03-17 13:22:01
Original
1764 people have browsed it

Solution to the problem that php writes pictures and does not display them: 1. Find and open the php.ini file; 2. Find "extension=php_gd2.dll" and remove the semicolon in front of it; 3. Restart Server; 4. Just clear the cache before drawing.

What should I do if the picture written in php does not display?

The operating environment of this tutorial: Windows 7 system, PHP version 8.1, Dell G3 computer.

What should I do if the picture written in php does not display?

The reason why pictures cannot be displayed in php drawing and its solution

In php drawing, you must first confirm whether the gd library is enabled. Go to the php.ini file and find extension=php_gd2.dll. Remove the previous; and restart the server.

What should I do if the picture written in php does not display?

What should I do if the picture written in php does not display?

If the normal picture is still not displayed in the drawing, it means that the server has incorrect picture information when replying to the request. Make sure Don’t put anything in front of , including html.

In addition, the picture is not displayed yet. Clear the cache before drawing (that is, before writing the header). First write ob_clean();

and then it can be displayed (including writing the file to download). Sometimes, if the file cannot be opened after downloading, you also need to clear the cache).

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What should I do if the picture written in php does not display?. 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template