生成验证码问题

浏览:788 发布日期:2013/09/16 分类:求助交流 关键字: 验证码
<?php
header("Content-Type:text/html;charset=utf-8");
header("Content-Type:image/jpeg");

$image=imagecreate(250,100);
$bgcolor=imagecolorallocate($image,250,180,180);
$fontcolor=imagecolorallocate($image,30,30,30);
for($a=0;$a<4;$a++)
{
  $rand.=dechex(rand(0,15));
}
$string=$rand;
imagettftext($image,50,7,40,80,$fontcolor,"./stcaiyun.ttf",$string);
imagejpeg($image);
imagedestroy($image);

?>
代码运行后并不显示啊,只是出现“图像‘http:localhost:8080/test.php’因其本身有错无法显示”,求大神帮忙解答下问题到底出在哪?
最佳答案
评论() 相关
后面还有条评论,点击查看>>