// 驗(yàn)證碼點(diǎn)擊刷新
var verify = document.getElementsByTagName("img")[0];
verify.addEventListener("click",function(){
this.setAttribute("src","./lib/createVerify.php?r=<?php echo rand();?>");
},false);
var verify = document.getElementsByTagName("img")[0];
verify.addEventListener("click",function(){
this.setAttribute("src","./lib/createVerify.php?r=<?php echo rand();?>");
},false);
2018-09-23
for ($i=0; $i < 200; $i++) {
$pointColor = imagecolorallocate($image,rand(50,200),rand(50,200),rand(50,200));
imagesetpixel($image,rand(1,99),rand(1,29),$pointColor);
}
$pointColor = imagecolorallocate($image,rand(50,200),rand(50,200),rand(50,200));
imagesetpixel($image,rand(1,99),rand(1,29),$pointColor);
}
2018-05-27
for ($i=0; $i < 200; $i++) {
$pointColor = imagecolorallocate($image,rand(20,200),rand(20,200),rand(20,200));
imagesetpixel($image,rand(1,99),rand(1,29),$pointColor);
}
$pointColor = imagecolorallocate($image,rand(20,200),rand(20,200),rand(20,200));
imagesetpixel($image,rand(1,99),rand(1,29),$pointColor);
}
2018-05-27
string substr ( string $string , int $start [, int $length ] )
返回字符串 string 由 start 和 length 參數(shù)指定的子字符串。
參數(shù)
string
輸入字符串。必須至少有一個(gè)字符。
start
如果 start 是負(fù)數(shù),返回的字符串將從 string 結(jié)尾處向前數(shù)第 start 個(gè)字符開始。
如果 string 的長(zhǎng)度小于 start,將返回 FALSE。
返回字符串 string 由 start 和 length 參數(shù)指定的子字符串。
參數(shù)
string
輸入字符串。必須至少有一個(gè)字符。
start
如果 start 是負(fù)數(shù),返回的字符串將從 string 結(jié)尾處向前數(shù)第 start 個(gè)字符開始。
如果 string 的長(zhǎng)度小于 start,將返回 FALSE。
$index = rand(0,count($strdb)-1); 這里要減一
2018-01-23