Home > Backend Development > PHP Tutorial > php绘图中显示不出图片的原因及解决_PHP

php绘图中显示不出图片的原因及解决_PHP

WBOY
Release: 2016-06-01 11:55:22
Original
878 people have browsed it

php绘图首先要确认gd库是否启用,到php.ini文件中,找到extension=php_gd2.dll将前面的;去掉,重新启动服务器。

如果在绘图中还是没有显示正常的图片,说明服务器在回复请求时,图片的信息有误,要保证不要前面不要有任何东西,包括html。

另外还不出图片,在绘图前清一下缓存(也就是在写header之前),先写ob_clean(); 然后就可以显示了(包括编写文件下载的时候,出现下载后打不开文件时,也需要清一下缓存)。

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