Example #1
0
function process($base, $array)
{
    $principal = function ($internalBase, $internalValue) {
        $pathBuffer = $internalBase . $internalValue . '/development/';
        $styleBuffer = minify($pathBuffer);
        echo $pathBuffer;
        $pathFile = $internalBase . $internalValue . '/output/import-' . $internalValue . '.min.css';
        writting($pathFile, $styleBuffer);
    };
    foreach ($array as $key => $value) {
        if (!is_array($value)) {
            $principal($base, $value);
        } else {
            $principal($base, $key);
            process($base . $key . '/', $value);
        }
    }
}
Example #2
0
	while($ay=mysql_fetch_array($query))
	{
		$ip=$ay['ip'];
		$counter=$ay['counter'];
		if($counter > $limitcount)
			$rule.="deny from $ip\n";
		else
		{
			$val="stop";
			break;
		}
	}
	if($val=="stop")
		break;
	else
		$offset+=200;
}
mysql_close($ldb);

$content="Order allow,deny\n";
$content.="allow from all\n";
$content.=$rule;
$content.="\n# Created at $dt\n";
writting("$filepath/portal/", ".htaccess", $content);
writting("$filepath/playcard/", ".htaccess", $content);

# 删除文件锁
unlink("$rootpath/ht.lock");
exit;
?>