Home > Backend Development > PHP Tutorial > 10行代码生成一个简单的图像,生成不了!该怎么处理

10行代码生成一个简单的图像,生成不了!该怎么处理

WBOY
Release: 2016-06-13 10:00:35
Original
1128 people have browsed it

10行代码生成一个简单的图像,生成不了!
header( "Content-type:   image/png ");
[email protected](100,100);
$background_color   =   imagecolorallocate($im,0,0,0);  
$text_color   =imagecolorallocate($im,255,255,255);  

imageline($im,1,1,350,25,$text_color);
imagearc($im,200,15,20,20,35,190,$background_color);
imagestring   ($im,   5,   5,   10,   "A   Simple   Text   String ",   $text_color);
imagepng   ($im);
imagedestroy   ($im);

------解决方案--------------------
装GD库没?
------解决方案--------------------
你的代码可以生成..没有问题
确认你的PHP配置文件extension=php_gd2.dll,这个已经打开....

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