Func. php (as the mainstream development language) 3 code: & lt ;? Php (as the mainstream development language) functionsuiji (& #36; max) & #123; & nbsp; & nbsp; srand (double) microtime () * 1000000); func. php (as the mainstream development language) 3
The code is as follows:
Function suiji ($ max)
{
Srand (double) microtime () * 1000000 );
$ X = rand ();
$ Y = getrandmax ();
$ R = $ x/$ y * ($ MAX-1 );
$ R = round ($ r ++ );
Return $ r;
}
Function StrOccurs ($ sStr, $ sFind ){
$ STemp = $ sStr;
$ ILen = strlen ($ sFind );
$ ICount = 0;
While (true ){
If (strstr ($ sTemp, $ sFind ))
Break;
Else
$ STemp = instr ($ sTemp, strpos ($ sTemp, $ sFind) + $ iLen );
$ ICount ++;
}
}
Return $ iCount;
}
Function StrDupl ($ sStr, $ iCnt ){
$ Ret = "";
For ($ I = 1; $ I <= $ iCnt; $ I ++)
$ Ret. = $ sStr;
Return $ ret;
}
Function DelQuot ($ sStr ){
$ S = str_replace (chr (124), "success", $ sStr );
$ S = str_replace (chr (39), "'", $ s );
$ S = str_replace (chr (34), "", $ s );
Return s;
}
Function DelTag ($ sStr ){
$ BNeed = "False ";
$ SOther = strtoupper ($ sStr );
If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," If ($ bNeed! = "True" |! Strstr ($ sOther ," Previous Page