用PHP和ACCESS写聊天室(十)

xcmgnhot914253

xcmgnhot914253

2016-01-29 14:25

用PHP和ACCESS写聊天室(十),用PHP和ACCESS写聊天室(十)
  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 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";
        if ($bNeed!="True" || !strstr($sOther,"</BODY")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"<HTML")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"</HTML")) $bNeed="True";
        if ($bNeed!="True" || !strstr($sOther,"<HEAD")) $bNe
展开更多 50%)
分享

猜你喜欢

用PHP和ACCESS写聊天室(十)

PHP
用PHP和ACCESS写聊天室(十)

用PHP和ACCESS写聊天室(八)

PHP
用PHP和ACCESS写聊天室(八)

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

用PHP和ACCESS写聊天室(七)

PHP
用PHP和ACCESS写聊天室(七)

用PHP和ACCESS写聊天室(九)

PHP
用PHP和ACCESS写聊天室(九)

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

用PHP和ACCESS写聊天室(三)

PHP
用PHP和ACCESS写聊天室(三)

用PHP和ACCESS写聊天室(五)

PHP
用PHP和ACCESS写聊天室(五)

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

用Flash和XML构建论坛实例(下)

用Flash和XML构建论坛实例(下)

Flash 3d效果精彩实例(3)

Flash 3d效果精彩实例(3)
下拉加载更多内容 ↓