用php生成一张图片,但是显示不出来
程序员文章站
2022-05-23 14:09:17
...
php
session_start();
for($i=0;$i$_nmsg.= dechex(mt_rand(0,15));
}
$_SESSION['code']=$_nmsg;
$_width=75;
$_height=25;
$_img=imagecreatetruecolor($_width,$_height);
$_white=imagecolorallocate($_img,255,255,255);
imagefill($_img,0,0,$_white);
header('Content-Type:image/png');
imagepng($_img);
imagedestroy($_img);
?>
上一篇: php引述&