What to do if php drawing does not display pictures

WBOY
Release: 2016-07-25 08:54:04
Original
1480 people have browsed it
This article introduces the reasons and solutions for the inability to display pictures when PHP uses the gd library to draw. Friends in need can refer to it.

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

If the normal picture 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 no anything in front of it, including html.

If the picture is not produced yet, clear the cache before drawing (that is, before writing the header), write ob_clean() first; Then the picture can be displayed (including when writing a file to download, if the file cannot be opened after downloading, the cache can be cleared). Example of php GD library generating thumbnails Basic knowledge of php gd library Detailed explanation of the usage of GD function in PHP GD library php GD library generates high-quality thumbnails (example) php gd library implements remote image download Usage of php GD library function getimagesize() php opens GD library (windows environment) Example code for drawing 24-hour histogram using php GD library How to install php GD support library under Linux Introduction to how to enable gd2 extension in php Example of php verification code (GD library generates verification code) Solution to Chinese garbled characters in php GD library Example of php GD library generating verification code php GD library code to upload images and create thumbnails



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