亂碼就在 php文件頁面添加header("content-type:text/html;charset=utf-8");編碼自己看著辦
<?php
ob_clean();
$image = imagecreatetruecolor(100, 30);
$bgcolor = imagecolorallocate($image, 255, 255, 255);
imagefill($image, 0 , 0, $bgcolor );
header('content-type:image/png');
imagepng($image);
imagedestroy($image);
ob_clean();
$image = imagecreatetruecolor(100, 30);
$bgcolor = imagecolorallocate($image, 255, 255, 255);
imagefill($image, 0 , 0, $bgcolor );
header('content-type:image/png');
imagepng($image);
imagedestroy($image);
2016-06-25
imagestring() 的第二個(gè)參數(shù)的取值范圍是 [1, 5]
http://php.net/manual/zh/function.imagestring.php
http://php.net/manual/zh/function.imagestring.php
2016-06-20
Notice: Undefined index: authcode 這個(gè)是怎么解決的???
$captch_code=$fontcontent;驗(yàn)證碼一直其實(shí)輸入錯(cuò)誤的,看好了$captch_code.=$fontcontent;這段代碼,前面那一段少了小數(shù)點(diǎn),所以錯(cuò)誤,加上小數(shù)點(diǎn)就好了
2016-06-04
這么大數(shù)組?得吃多少內(nèi)存,直接隨機(jī)生成不就行了嗎
2016-06-03