求助为什么不能输出图片!
php吧
全部回复
仅看楼主
level 6
ahjxchenchao 楼主
//创建一张图片
$_width=75;
$_height=25;
$_img = imagecreatetruecolor($_width,$_width);
//输出图片
header('Content-type:image/png');
imagepng($_img);
//销毁
imagedestroy($_img);
这样写有错误吗?为什么在浏览器上会显示Fatal error: Call to undefined function imagecreatetruecolor() in E:\GUEST\text0.7\code.php on line 15
2014年06月18日 06点06分 1
level 12
我要是楼主,我一定把$_height赋的值改成75,我还要把函数的名字再弄长点。毕竟我的服务器那么好,英语那么专业,输入速度那么快,写的函数名又是那么的正确
2014年06月18日 08点06分 2
level 10
我的也是差不多,结果是乱码。你有没有加载成功GD库?还有jgraph
2014年06月18日 08点06分 3
level 7
看看你的
php.ini 有没有加载GD2库
extension=php_gd2.dll
前面的 ; 号去掉
2014年06月18日 08点06分 4
谢谢。是没有开GD库。
2014年06月19日 04点06分
1