驗(yàn)證碼字號問題
我是按照老師的步驟寫的,效果也都實(shí)現(xiàn)了,但是覺得字號有點(diǎn)小,于是我就把字號給調(diào)大了,但是沒有反應(yīng),和變大之前的字號是一樣的,也就是說,我所設(shè)置的字號無效。這點(diǎn)不是很理解
我是按照老師的步驟寫的,效果也都實(shí)現(xiàn)了,但是覺得字號有點(diǎn)小,于是我就把字號給調(diào)大了,但是沒有反應(yīng),和變大之前的字號是一樣的,也就是說,我所設(shè)置的字號無效。這點(diǎn)不是很理解
2016-07-25
舉報(bào)
2016-08-01
http://php.net/manual/zh/function.imagestring.php?這里font只用1--5 最大就是5了 如果你想要更大的話可以使用imagettftext:array ImageTTFText(int im, int size, int angle, int x, int y, int col, string fontfile, string text); 參數(shù)分別為 image,字體大小,角度 0代表水平,顏色,字體文件名 這里可以引用字體文件,內(nèi)容。
示例:?
? ? $fontcontent=rand(0,9);
? ? $fontcolor=imagecolorallocate($image, rand(0,120), rand(0,120), rand(0,120));
? ? $x=($i*100/4)+rand(5,10);
? ? $y=rand(15,30);
? ?imagettftext($image, 20, 0, $x, $y, $fontcolor ,'../fonts/BebasNeue-webfont.ttf', $fontcontent);
2016-07-27
查手冊或者百度