PHP求教【关于画图】

<?php
 //先做一个画布

 $im=imagecreatetruecolor(400,300);
 //默认背景是黑色
 $white=imagecolorallocate($im,255,255,255);
 imagefill($im,0,0,$white);
 //先画出扇形
 //创建三个颜色
 $red=imagecolorallocate($im,255,0,0);
 $blue=imagecolorallocate($im,0,0,128);
 $gray=imagecolorallocate($im,192,192,192);

 imagefilledarc($im,100,50,100,60,0,35,$red,IMG_ARC_PIE);
 imagefilledarc($im,100,50,100,60,36,75,$bule,IMG_ARC_PIE);
 imagefilledarc($im,100,50,100,60,76,360,$gray,IMG_ARC_PIE);
 
  header("Content-Type: image/png");
 
  imagepng($im);

  //销毁该图片,释放内存
  imagedestroy($im);

?>

 

以上是一个简单的基础代码,但在运行的时候 出现了

网页上图片打不开的情况,请各位帮帮忙,应该不是环境 的问题,:GD库也已开启

 

 

posted on 2013-01-17 13:55  花皮狗儿  阅读(109)  评论(0)    收藏  举报

导航