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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

同樣的代碼,為何運(yùn)行起來(lái)是個(gè)小方塊

//創(chuàng)建畫布

$width =400;

$height=50;

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

//創(chuàng)建顏色

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

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

//創(chuàng)建一個(gè)畫筆顏色

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

//開始繪制

$size =mt_rand(20,28);

$angle=mt_rand(-15,15);

$x=50;

$y=30;

$fontFile='fonts/cambriaz.ttf';

$text=mt_rand(1000,9999);


imagettftext($images,$size,$x,$y,$randColor,$fontFile,$text);

//告訴瀏覽器以圖形形式展示


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

//輸入圖像

imagepng($images);

//銷毀 圖形

imagedestroy($images);

https://img1.sycdn.imooc.com//5b8ff6a20001564b03790193.jpg

正在回答

1 回答

找到問(wèn)題完美呈現(xiàn),imagettftext($images,$size,$x,$y,$randColor,$fontFile,$text); 參數(shù)傳入不正確,正確的應(yīng)該是:

imagettftext($images,$size,$angle,$x,$y,$randColor,$fontFile,$text);


0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

同樣的代碼,為何運(yùn)行起來(lái)是個(gè)小方塊

我要回答 關(guān)注問(wèn)題
微信客服

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)