用PHP和ACCESS写聊天室(十)_PHP教程

WBOY
풀어 주다: 2016-07-21 16:02:43
원래의
1057명이 탐색했습니다.

func.php3
代码如下:
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                $ret.=$sStr;
        return $ret;
}

function DelQuot($sStr){
        $s=str_replace(chr(124),"¦",$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,"
")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"<script> if ($bNeed!="True" || !strstr($sOther,"</script>")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"        if ($bNeed!="True" || !strstr($sOther,"")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"        if ($bNeed!="True" || !strstr($sOther,"")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"        if ($bNeed!="True" || !strstr($sOther,"")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"
        if ($bNeed!="True" || !strstr($sOther,"
")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"        if ($bNeed!="True" || !strstr($sOther,"")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"        if ($bNeed!="True" || !strstr($sOther,"")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"        if ($bNeed!="True" || !strstr($sOther,"")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"        if ($bNeed!="True" || !strstr($sOther,"")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"        if ($bNeed!="True" || !strstr($sOther,"")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"        if ($bNeed!="True" || !strstr($sOther,"")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"        if ($bNeed!="True" || !strstr($sOther,"FONT-SIZE:")) $bNeed="True";
        if ($bNeed=="True")
                return str_replace(">",">",str_replace("        else
                return $sStr;
}

function AddLost($sStr){
        $ret=$sStr;
        $ret.=StrDupl(">", (StrOccurs(strtoupper($ret), "")));
        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "")));
        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "")));
        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "")));
        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "")));
        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "")));
        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "")));
        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "")));
        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "")));
        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "")));
        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "")));
        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), ""))); <br>        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "<samp stroccurs>"))); <br>        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "<kbd stroccurs>"))); <br>        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "<var stroccurs>"))); <br>        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "<dfn stroccurs>"))); <br>        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "<big stroccurs>"))); <br>        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "<sup stroccurs>"))); <br>        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "<sub stroccurs>"))); <br>        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "<h1 stroccurs>"))); <br>        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "<h2 stroccurs>"))); <br>        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "<h3 stroccurs>"))); <br>        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "<h4 stroccurs>"))); <br>        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "<h5 stroccurs>"))); <br>        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "<h6 stroccurs>"))); <br>        $ret.=StrDupl("", (StrOccurs(strtoupper($ret), "<h7 stroccurs>"))); <br>        return $ret; <br>} <br>?> <br><br><br>【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】    <br><br> <br> <p align="left"></p> <div style="display:none;"> <span id="url" itemprop="url">http://www.bkjia.com/PHPjc/316531.html</span><span id="indexUrl" itemprop="indexUrl">www.bkjia.com</span><span id="isOriginal" itemprop="isOriginal">true</span><span id="isBasedOnUrl" itemprop="isBasedOnUrl">http://www.bkjia.com/PHPjc/316531.html</span><span id="genre" itemprop="genre">TechArticle</span><span id="description" itemprop="description">func.php3 代码如下: ?php function suiji($max) { srand((double)microtime()*1000000); $x=rand(); $y=getrandmax(); $r=$x/$y*($max-1); $r=round($r++); return $r; } function StrOcc...</span> </div> <div class="art_confoot"></div> </h7> </h6> </h5> </h4> </h3> </h2> </h1></sub></sup></big></dfn></var></kbd></samp>
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿