当前位置: 首页>>代码示例>>PHP>>正文


PHP checkfiles函数代码示例

本文整理汇总了PHP中checkfiles函数的典型用法代码示例。如果您正苦于以下问题:PHP checkfiles函数的具体用法?PHP checkfiles怎么用?PHP checkfiles使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了checkfiles函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkfiles

function checkfiles($currentdir, $ext = '', $sub = 1, $skip = '')
{
    global $md5data;
    $dir = @opendir($currentdir);
    $exts = '/(' . $ext . ')$/i';
    $skips = explode(',', $skip);
    while ($entry = @readdir($dir)) {
        $file = $currentdir . $entry;
        if ($entry != '.' && $entry != '..' && $entry != '.svn' && (preg_match($exts, $entry) || $sub && is_dir($file)) && !in_array($entry, $skips)) {
            if ($sub && is_dir($file)) {
                checkfiles($file . '/', $ext, $sub, $skip);
            } else {
                $md5data[$file] = md5_file($file);
            }
        }
    }
}
开发者ID:renduples,项目名称:alibtob,代码行数:17,代码来源:checkfile.php

示例2: die

     } else {
         $z = ".zip";
     }
     if (!file_exists("clients/assets" . $z) || !file_exists("clients/" . $client . "/bin/") || !file_exists("clients/" . $client . "/mods/") || !file_exists("clients/" . $client . "/coremods/") || !file_exists("clients/" . $client . "/config.zip")) {
         die(Security::encrypt("client<\$> {$client}", $key1));
     }
     $md5user = strtoint(xorencode(str_replace('-', '', uuidConvert($realUser)), $protectionKey));
     $md5zip = @md5_file("clients/" . $client . "/config.zip");
     $md5ass = @md5_file("clients/assets.zip");
     $sizezip = @filesize("clients/" . $client . "/config.zip");
     $sizeass = @filesize("clients/assets.zip");
     $echo1 = "{$masterversion}<:>{$md5user}<:>" . $md5zip . "<>" . $sizezip . "<:>" . $md5ass . "<>" . $sizeass . "<br>" . $realUser . '<:>' . strtoint(xorencode($sessid, $protectionKey)) . '<br>' . $acesstoken . '<br>';
     if ($assetsfolder) {
         echo Security::encrypt($echo1 . str_replace("\\", "/", checkfiles('clients/' . $client . '/bin/') . checkfiles('clients/' . $client . '/mods/') . checkfiles('clients/' . $client . '/coremods/') . checkfiles('clients/assets')) . '<::>assets/indexes<:b:>assets/objects<:b:>assets/virtual<:b:>' . $client . '/bin<:b:>' . $client . '/mods<:b:>' . $client . '/coremods<:b:>', $key1);
     } else {
         echo Security::encrypt($echo1 . str_replace("\\", "/", checkfiles('clients/' . $client . '/bin/') . checkfiles('clients/' . $client . '/mods/') . checkfiles('clients/' . $client . '/coremods/')) . '<::>' . $client . '/bin<:b:>' . $client . '/mods<:b:>' . $client . '/coremods<:b:>', $key1);
     }
 } else {
     if ($action == 'getpersonal') {
         $stmt = $db->prepare("SELECT user,realmoney FROM usersession WHERE user= :login");
         $stmt->bindValue(':login', $login);
         $stmt->execute();
         $row = $stmt->fetch(PDO::FETCH_ASSOC);
         $realmoney = $row['realmoney'];
         if ($iconregistered) {
             $stmt = $db->prepare("SELECT username,balance FROM iConomy WHERE username= :login");
             $stmt->bindValue(':login', $login);
             $stmt->execute();
             $row = $stmt->fetch(PDO::FETCH_ASSOC);
             $iconmoney = $row['balance'];
         } else {
开发者ID:Dragoy,项目名称:Fix-Sashok-theme,代码行数:31,代码来源:launcher.php

示例3: hashc

 function hashc($assetsfolder, $client)
 {
     if ($assetsfolder) {
         $hash_md5 = str_replace("\\", "/", checkfiles('clients/' . $client . '/bin/') . checkfiles('clients/' . $client . '/mods/') . checkfiles('clients/' . $client . '/coremods/') . checkfiles('clients/' . $client . '/natives/') . checkfiles('clients/' . $client . '/scripts/') . checkfiles('clients/assets')) . '<::>assets/indexes<:b:>assets/objects<:b:>assets/virtual<:b:>' . $client . '/bin<:b:>' . $client . '/mods<:b:>' . $client . '/coremods<:b:>' . $client . '/natives<:b:>' . $client . '/scripts<:b:>';
     } else {
         $hash_md5 = str_replace("\\", "/", checkfiles('clients/' . $client . '/bin/') . checkfiles('clients/' . $client . '/mods/') . checkfiles('clients/' . $client . '/coremods/') . checkfiles('clients/' . $client . '/natives/') . checkfiles('clients/' . $client . '/scripts/')) . '<::>' . $client . '/bin<:b:>' . $client . '/mods<:b:>' . $client . '/coremods<:b:>' . $client . '/natives<:b:>' . $client . '/scripts<:b:>';
     }
     return $hash_md5;
 }
开发者ID:mcstyle,项目名称:launcher,代码行数:9,代码来源:launcher.php

示例4: THdie

    // when they're not logged in
    if ($binfo['requireregistration'] == true) {
        if ($_SESSION['username'] == false) {
            THdie("POnonewth");
        }
        // Set the posting username to be the user stored in our session info
        $_POST['nombre'] = $_SESSION['username'];
    }
}
if ($binfo['tlock'] == 1 && $mod == false) {
    THdie("POnonewth");
}
//File checking and processing here, I suppose.
$filemessages = array();
// Array of strings regarding "bad" files
$goodfiles = checkfiles($binfo, $filemessages);
//echo(count($goodfiles));
if ($binfo['tpix'] == 0 && count($goodfiles) > 0 && $mod == false) {
    THdie("POthnopix");
}
if ($binfo['tpix'] == 2 && count($goodfiles) == 0 && $mod == false) {
    THdie("POthmustpix");
}
if (count($goodfiles) == 0 && !$_POST['body'] && $mod == false) {
    //oops, tyam moment
    THdie("You must post images or leave a comment.");
}
$pin = (int) ($_POST['pin'] == "on" && $mod);
$lock = (int) ($_POST['lock'] == "on" && $mod);
$permasage = (int) ($_POST['permasage'] == "on" && $mod);
$usethese = preptrip($_POST['nombre']);
开发者ID:kamilpacaq,项目名称:drydock,代码行数:31,代码来源:thread.php


注:本文中的checkfiles函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。