PHP file image cannot be displayed

王林
Release: 2023-02-25 16:26:01
Original
5033 people have browsed it

PHP file image cannot be displayed

Solution to the problem that the PHP file image cannot be displayed

##Solution steps:

1. First, confirm whether the gd library is enabled

2. Go to the php.ini file, find extension=php_gd2.dll and remove the previous one

3. Retry Start the server.

If the normal image is still not displayed in the drawing, it means that the image information is incorrect when the server responds to the request. Make sure there is nothing in front of , including html code.

If the image is not displayed yet, clear the cache before drawing (that is, before writing the header), write ob_clean() first, and then it can be displayed (including when writing a file to download, after downloading) When the file cannot be opened, you also need to clear the cache).


Recommended tutorial:

PHP video tutorial

The above is the detailed content of PHP file image cannot be displayed. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!