warning: imagecolorallocate() expects parameter 1 to be resource, boolean given in e:\wampserver\project\驗證碼類的封裝及註冊頁面的測試\驗證碼類的封裝.php on line 124
warning: imagettftext() expects parameter 1 to be resource, boolean given in e:\wampserver\project\驗證碼類的封裝及註冊頁面的測試\驗證碼類的封裝.php on line 85
求大神幫忙指點一下
class
captcha
elseif(
isset
($config
['width'])
&&$config
['width'
]>0)
if(isset
($config
['height'])
&&$config
['height'
]>0)
if(isset
($config
['size'])
&&$config
['size'
]>0)
if(isset
($config
['length'])
&&$config
['length'
]>0)
if(isset
($config
['snow'])
&&$config
['snow'
]>0)
if(isset
($config
['pixel'])
&&$config
['pixel'
]>0)
if(isset
($config
['line'])
&&$config
['line'
]>0)
$this
->
_image
=imagecreatetruecolor
($this
->
_width
,$this
->
_height);
return
$this
->
_image;}
else
}public
function
getcaptcha()
$fontfile
=$this
->
_fontfile
;for($i
=0;$i
<
$this
->
_length;$i
++)if(
$this
->
_snow
)elseif(
$this
->
_line)}
header
('content-type:image/jpeg');
imagejpeg
($this
->
_image);
imagedestroy
($this
->
_image);
}private
function
_generatestr
($length=4
)$chars
=array
('a'
,'b'
,'c'
,'d'
,'e'
,'f'
,'g'
,'h'
,'j'
,'k'
,'m'
,'n'
,'p'
,'q'
,'r'
,'s'
,'t'
,'u'
,'v'
,'w'
,'x'
,'y'
,'z'
,'a'
,'b'
,'c'
,'d'
,'e'
,'f'
,'g'
,'h'
,'j'
,'k'
,'m'
,'n'
,'p'
,'q'
,'r'
,'s'
,'t'
,'u'
,'v'
,'w'
,'x'
,'y'
,'z',1
,2,3
,4,5
,6,7
,8,9
);$str
=join(''
,array_rand
(array_flip
($chars),
$length))
;return
$str;}
private
function
_getrandcolor()
private
function
_getsnow()
}private
function
_getpixel()
}private
function
_getline()
}}$config
=array
('fontfile'
=>
'e:\wampserver\project\group***.ttf');
$cap
=new
captcha
($config);
$cap
->
getcaptcha()
;
求大神幫忙解答
void delete client struct medicines message n struct medicines temp str struct medicines delete str 查詢要刪除的藥品 else 將其他無關記錄儲存下來 else fclose fp if found ...
求大神幫忙看一下sql
求大神幫忙看一下sql select id,username,id father,team con from select r as id,select r id father from ibcusers where username id as parent username from selec...
PHP關閉Notice錯誤提示
最近又開始用php做 了,好久不用了,重新拾起來感覺又遇到好多類似小問題,希望這次盡量把遇到的問題全部記錄下來,以後不要再忘嘍!php 預設設定會顯示notice.php關閉notice錯誤提示 error reporting 0 禁用錯誤報告 error reporting e all e not...