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

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

為什么我的總是提醒打不開字體文件??好著急啊

session_start();

$image=imagecreatetruecolor(200, 60);

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

imagefill($image, 0, 0, $color);


$fonttype='STKAITI.TTF';

$array_font="的是了我不人在他有這個(gè)上們來(lái)到時(shí)大地為子中你說(shuō)生國(guó)年

? ? 著就那和要她出也得里后自以會(huì)家可下而過(guò)天去能對(duì)小多然于心學(xué)么之都好看

? ? 起發(fā)當(dāng)沒(méi)成只如事把還用第樣道想作種美總從無(wú)情己面最女但現(xiàn)前些所同日手又

? ? 行意動(dòng)方期它頭經(jīng)長(zhǎng)兒回位分愛(ài)老因很給名法間斯知世什兩次使身者被高已親其進(jìn)此話常與活正感"

;

? ? $v=str_split($array_font,3);

? ? $captch_code='';

? ? for ($i=0;$i<4;$i++){

? ? ? ? $fontsize=6;

? ? ? ?$fontcolor= imagecolorallocate($image, rand(40,160), rand(40,160), rand(40,160));


? ? ? $index = rand(0,count($v));

? ? ? $cn=$v[$index];

? ? ? $captch_code.=$cn;


? ? ? imagettftext($image, mt_rand(20,24),mt_rand(-60,60),(40*$i+20),mt_rand(30,35), $fontcolor, $fonttype, $cn);

? ? }


? ? $_SERVER['codee']=$captch_code;


? ? for($i=0;$i<200;$i++){

? ? ? ? //設(shè)定顏色

? ? ? ? $color = imagecolorallocate($image, rand(50,180), rand(50,180), rand(50,280));

? ? ? ? //坐標(biāo)

? ? ? ? $x=rand(0,200);

? ? ? ? $y= rand(0,60);

? ? ? ? //系統(tǒng)函數(shù)imagesetpixel設(shè)定像素點(diǎn)

? ? ? ? imagesetpixel($image, $x, $y, $color);

? ? }

? ? for ($i=0;$i<3;$i++){

? ? ? ? $linecolor=imagecolorallocate($image, rand(80,220), rand(80,220), rand(80,220));

? ? ? ? //坐標(biāo)

? ? ? ? $x1 = rand(1,99);

? ? ? ? $y1 = rand(1,59);

? ? ? ? $x2 = rand(5,200);

? ? ? ? $y2 = rand(1,59);

? ? ? ? //系統(tǒng)函數(shù)imageline設(shè)置劃線

? ? ? ? //也可以直接在函數(shù)imageline內(nèi)設(shè)定坐標(biāo):

? ? ? ? //imageline($image,rand(8,99),rand(1,28),rand(5,99),rand(1,28)$linecolor);

? ? ? ? imageline($image, $x1, $y1, $x2, $y2, $linecolor);

? ? }



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

? ?imagepng($image);


imagedestroy($image);


正在回答

1 回答

已經(jīng)找到解決辦法了:把字體文件的路徑賦值就好了,而不是字體文件的名稱
正確:$fonttype="D:\wamp64\www\project01\STKAITI.TTF"
失敗:$fonttype='STKAITI.TTF';
錯(cuò)誤代碼在上文第六行

2 回復(fù) 有任何疑惑可以回復(fù)我~
#1

追覓夢(mèng)初的國(guó)度

感謝你!我也是這樣的問(wèn)題.
2019-04-05 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

為什么我的總是提醒打不開字體文件??好著急啊

我要回答 關(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)