Home > Backend Development > PHP Tutorial > php画图函数画不出图来,

php画图函数画不出图来,

WBOY
Release: 2016-06-13 10:33:12
Original
999 people have browsed it

php画图函数画不出图来,求助啊!
$im = imagecreate(400,30);
$black = imagecolorallocate($im, 0,0,0);
$white = imagecolorallocate($im, 255,255,255);
imageline($im, 1, 1, 350, 25, $black);
imagearc($im, 200, 15, 20, 20, 35, 190, $black);
imagestring($im, 5, 4, 10, "Graph TEST!!", $white);
imagepng($im);
imageDestroy($im);
?>
扩展库已经打开了,服务器是IIs的为什么显示不出图片呢?

------解决方案--------------------
去掉header,看看浏览器会报出哪些的错误。
------解决方案--------------------
php.ini中打开错误提示 display_errors=On
error_reporting=E_ALL & ~E_NOTICE 

重启iis 
把header注释掉。再测试是什么情况。

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