for($i=0; $i<200; $i++){
$pointcolor = imagecolorallocate($image, rand(50,200), rand(50,200), rand(50,200));
imagesetpixel($image, rand(0,99), rand(0,29), $pointcolor);
}
感謝老師~收獲很多
$pointcolor = imagecolorallocate($image, rand(50,200), rand(50,200), rand(50,200));
imagesetpixel($image, rand(0,99), rand(0,29), $pointcolor);
}
感謝老師~收獲很多
2017-03-11
strlen($data)是字符串的長(zhǎng)度,當(dāng)rand取strlen($data)時(shí),長(zhǎng)度超過了最大長(zhǎng)度,要減去1.
字母數(shù)字混合驗(yàn)證碼其中有一處錯(cuò)誤 截取字符串長(zhǎng)度時(shí)應(yīng)當(dāng)為strlen($data)-1,即
$fontcontent = substr($data,rand(0,strlen($data)-1),1);
$fontcontent = substr($data,rand(0,strlen($data)-1),1);
2017-02-19
加上session那一段就沒錯(cuò)誤了,可能是你括號(hào)混亂了,我就是,haha
2017-01-23