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)是字符串的長度,當(dāng)rand取strlen($data)時,長度超過了最大長度,要減去1.
2017-03-09
字母數(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