php随机验证码图片显示不出来
for($i=0;$i<4;$i++){$rand.=dechex(rand(0,15));}header('Content-Type:image/png');$im=i...
for($i=0;$i<4;$i++){
$rand.=dechex(rand(0,15));
}
header('Content-Type: image/png');
$im = imagecreatetruecolor(75,25);
$blue = imagecolorallocate($im,0,102,255);
imagefill($im,0,0,$blue);
$white = imagecolorallocate($im,255,255,255);
//imageline($im,0,0,200,200,$white);
//imageline($im,200,0,0,200,$white);
//imagestring($im,5,0,0,'$rand',$white);
imagepng($im);
imagedestroy($im);
为什么注释掉循环图像就能显示出来 展开
$rand.=dechex(rand(0,15));
}
header('Content-Type: image/png');
$im = imagecreatetruecolor(75,25);
$blue = imagecolorallocate($im,0,102,255);
imagefill($im,0,0,$blue);
$white = imagecolorallocate($im,255,255,255);
//imageline($im,0,0,200,200,$white);
//imageline($im,200,0,0,200,$white);
//imagestring($im,5,0,0,'$rand',$white);
imagepng($im);
imagedestroy($im);
为什么注释掉循环图像就能显示出来 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询