Home >Backend Development >PHP Tutorial >php cannot load images

php cannot load images

王林
王林Original
2019-09-27 17:51:264320browse

php cannot load images

Solution to the problem that php cannot load images

Solution steps:

1. For php drawing, you must first confirm whether the gd library is enabled

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

3. Restart 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 any html code.

If the picture still does not appear, clear the cache before drawing (that is, before writing the header), first write ob_clean(); and then it can be displayed (including when writing a file to download, and the print after downloading appears. You also need to clear the cache when the file is not open).

Recommended tutorial: PHP video tutorial

The above is the detailed content of php cannot load images. 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