当前位置:Gxlcms > PHP教程 > 用php生成一张图片,但是显示不出来

用php生成一张图片,但是显示不出来

时间:2021-07-01 10:21:17 帮助过:2人阅读

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);
?>
图片说明

人气教程排行