Example #1
0
function findFolderRepeatFunction($folderPath)
{
    $filePath = '';
    $s = '';
    $c = '';
    $content = '';
    $Funs = '';
    $FunList = '';
    $AllFunList = '';
    $nOK = '';
    $nErr = '';
    $splStr = '';
    $splxx = '';
    $nAllOK = '';
    $nAllErr = '';
    $nI = '';
    $ErrFunList = '';
    $AllErrFunList = '';
    HandlePath($folderPath);
    //获得完整路径
    $c = '操作文件夹' . $folderPath . vbCrlf();
    $content = getDirFileList($folderPath, '');
    $splStr = aspSplit($content, vbCrlf());
    $nI = 0;
    foreach ($splStr as $key => $filePath) {
        $nI = $nI + 1;
        $s = $nI . '、' . $filePath;
        $content = getFText($filePath);
        $content = getScanFunctionNameList($content);
        //获得ASP函数名称列表
        $nOK = 0;
        $nErr = 0;
        $nAllOK = 0;
        $nAllErr = 0;
        $FunList = '';
        $ErrFunList = '';
        $AllErrFunList = '';
        $splxx = aspSplit($content, vbCrlf());
        foreach ($splxx as $key => $Funs) {
            if ($Funs != '') {
                if (inStr('|' . $FunList . '|', '|' . $Funs . '|') == 0) {
                    $FunList = $FunList . $Funs . '|';
                    $nOK = $nOK + 1;
                } else {
                    $ErrFunList = $ErrFunList . $Funs . '|';
                    $nErr = $nErr + 1;
                }
                if (inStr('|' . $AllFunList . '|', '|' . $Funs . '|') == 0) {
                    $AllFunList = $AllFunList . $Funs . '|';
                    //全部函数
                    $nAllOK = $nAllOK + 1;
                } else {
                    $AllErrFunList = $AllErrFunList . $Funs . '|';
                    $nAllErr = $nAllErr + 1;
                }
            }
            doEvents();
        }
        //Call CreateFile("allfun.txt", AllFunList)
        $c = $c . $s . ',函数(' . uBound($splStr) + 1 . '),重复(' . $nErr . '[' . $ErrFunList . '])全部函数重复(' . $nAllErr . '[' . $AllErrFunList . '])' . vbCrlf();
        doEvents();
    }
    $findFolderRepeatFunction = $c;
    return @$findFolderRepeatFunction;
}
Example #2
0
function getDirPhpList($folderPath)
{
    return getDirFileList($folderPath, 'php');
}