Home >Backend Development >PHP Tutorial >用php生成一张图片,但是显示不出来

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-02 11:32:231410browse

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn