예제 #1
0
파일: tools.php 프로젝트: scarnago/pipecode
function fs_remove($path)
{
    if (fs_is_dir($path)) {
        $a = fs_dir($path);
        $rc = true;
        for ($i = 0; $i < count($a); $i++) {
            $rc = $rc && fs_remove($path . "/" . $a[$i]);
        }
        return $rc && fs_remove_dir($path);
    } else {
        return fs_unlink($path);
    }
}
예제 #2
0
파일: index.php 프로젝트: scarnago/pipecode
    $s3 = "";
}
if ($user_page == "") {
    $root = $main_root;
} else {
    $root = $user_root;
}
if ($s1 == "") {
    include "{$root}/index.php";
    die;
}
if (fs_is_file("{$root}/{$s1}.php")) {
    include "{$root}/{$s1}.php";
    die;
} else {
    if (fs_is_dir("{$root}/{$s1}")) {
        if ($s2 == "") {
            if (fs_is_file("{$root}/{$s1}/index.php")) {
                include "{$root}/{$s1}/index.php";
                die;
            }
        } else {
            if (fs_is_file("{$root}/{$s1}/{$s2}.php")) {
                include "{$root}/{$s1}/{$s2}.php";
                die;
            }
            if ($s3 != "" && fs_is_file("{$root}/{$s1}/{$s3}.php")) {
                include "{$root}/{$s1}/{$s3}.php";
                die;
            }
            if (fs_is_file("{$root}/{$s1}/root.php")) {