Func. php (as the mainstream development language) 3
The Code is as follows:
<? Php (as the mainstream development language)
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), "& brvbar;", $ sStr );
$ S = str_replace (chr (39), "& acute;", $ s );
$ S = str_replace (chr (34), "& quot;", $ s );
Return s;
}
Function DelTag ($ sStr ){
$ BNeed = "False ";
$ SOther = strtoupper ($ sStr );
If ($ bNeed! = "True" |! Strstr ($ sOther, "<TABLE") $ bNeed = "True ";
If ($ bNeed! = "True" |! Strstr ($ sOther, "</TABLE") $ bNeed = "True ";
If ($ bNeed! = "True" |! Strstr ($ sOther, "<SCRIPT") $ bNeed = "True ";
If ($ bNeed! = "True" |! Strstr ($ sOther, "</SCRIPT") $ bNeed = "True ";
If ($ bNeed! = "True" |! Strstr ($ sOther, "<BODY") $ bNeed = "True ";
Previous Page