$im = imagecreate(200,200);
$white = imagecolorallocate($im,0xff,0xff,0xff);
$black = imagecolorallocate($im,0x00,0x00,0xff);
imagefilledrectangle($im,50,50,150,150,$black);
header('Content-Type: image/png');
//imagepng($im);
imagepng($im,"./pic3037.png"); //这个图像也不能生成 一段程序有多少错误,你自己对照一下.
1 ;号改成,号.
2 balck 改成black
3 其它的懒得说了,呵呵
还有没有其他的办法,帮忙指点一下啊
我用php designer检测过了 没有错误,就是没有输出
还有没有其他的办法,帮忙指点一下啊
我用php designer检测过了 没有错误,就是没有输出
$black = imagecolorallocate($im,0x00,0x00,0xff);
imagefilledrectangle($im,50,50,150,150,$black);
你的$black写成$balck,这是逻辑错误.
另外,;号可以代替,号,这样也能检查出没有错误,我不得不怀疑你所谓的php designer好不好用.帖出正确的已经测试过的代码了.
自己对照一下.