第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

有問題的可以看看

<?php
$width?=?200;
$height?=?50;
$image?=?imagecreatetruecolor($width,$height);
$white?=?imagecolorallocate($image,255,255,255);
$rand_color?=?imagecolorallocate($image,mt_rand(60,125),mt_rand(60,125),mt_rand(60,125));
imagefilledrectangle($image,0,0,$width,$height,$white);
$string?=?join('',array_merge(range(0,9),range('a','z'),range('A','Z')));
$number?=?4;
for($i?=?0;$i?<?$number;$i++){
????$angle?=?mt_rand(-15,15);
????$fontsize?=?mt_rand(24,28);
????$text?=?str_shuffle($string)[0];
????$x?=?20?+?40?*?$i;
????$y?=?35;
????imagettftext($image,$fontsize,$angle,$x,$y,$rand_color,'msyh.ttc',$text);
}
header('content-type:image/png');
imagepng($image);
imagedestroy($image);
?>


正在回答

4 回答

嗯嗯,謝謝樓主

0 回復 有任何疑惑可以回復我~

顯示一片黑的情況可以在header前加一句ob_clean();是用于清除緩沖區(qū)的,我從別的地方看到的,具體原因未知。

0 回復 有任何疑惑可以回復我~

<?php?

$width=400;

$height=50;

$image=imagecreatetruecolor($width,$height);

$white=imagecolorallocate($image,255,255,255);

$randColor=imagecolorallocate($image,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));

imagefilledrectangle($image,0,0,$width,$height,$white);

$num = 4;

for($i = 0;$i<$num;$i++){

$size=mt_rand(20,28);

$angle=mt_rand(-15,15);

$x=20 + 40*$i;

$y=30;

$text=mt_rand(1000,9999);

imagettftext($image,$size,$angle,$x,$y,$randColor,'SIMYOU.ttf',$text);

}

header('content-type:image/png');

imagepng($iamge);

imagedestroy($image);

?>?

能幫忙看一下嗎,我的代碼也是顯示不出來


0 回復 有任何疑惑可以回復我~
<?php
	$width?=?200;
	$height?=?40;
	$img?=?imagecreatetruecolor($width,?$height);
	$col?=?imagecolorallocate($img,?mt_rand(200,?255),mt_rand(200,?255),mt_rand(200,?255));
	$randCol?=?imagecolorallocate($img,?mt_rand(10,?100),?mt_rand(10,?100),?mt_rand(10,?100));
	$string?=?join('',?array_merge(range(0,9),?range('a','z'),?range('A','Z')));
	imagefilledrectangle($img,?0,?0,?$width,?$height,?$col);
	$length?=?4;
	for($i?<?0;?$i?<?$length;?$i++){
		$size?=?mt_rand(20,?28);
		$angle?=?mt_rand(-15,?15);
		$x?=?20+40*$i;
		$y?=?30;
		$fontFile?=?'GARTON.TTF';
		$text?=?str_shuffle($string)[0];
		imagettftext($img,?$size,?$angle,?$x,?$y,?$randCol,?$fontFile,?$text);
	}
	header('content-type:image/png');
	imagepng($img);
	imagedestroy($img);
?>

您幫我看看,這個和你的代碼有什么不一樣嗎?我這個運行出來是一片黑的……

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

有問題的可以看看

我要回答 關注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號