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


PHP DirDelete函数代码示例

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


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

示例1: DirDelete

function DirDelete($t_dir)
{
    $dirh = opendir($t_dir);
    while (false !== ($filename = readdir($dirh))) {
        if ($filename != '.' && $filename != '..') {
            if (!is_file($t_dir . '/' . $filename)) {
                DirDelete($t_dir . '/' . $filename);
            } else {
                @unlink($t_dir . '/' . $filename);
            }
        }
    }
    closedir($dirh);
    @rmdir($t_dir);
}
开发者ID:eosliebe,项目名称:rb,代码行数:15,代码来源:dir.func.php

示例2: checkAdmin

<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
if (!$nowLayout || !$theme) {
    exit;
}
include $g['path_core'] . 'function/dir.func.php';
$themedir = $g['path_layout'] . $nowLayout . '/_theme/' . $theme;
DirDelete($themedir);
getLink(str_replace('&newtheme=Y', '', str_replace('&_edittheme=' . $theme, '', $_SERVER['HTTP_REFERER'])), 'parent.', '', '');
开发者ID:hoya0704,项目名称:trevia.co.kr,代码行数:13,代码来源:a.deletetheme.php

示例3: checkAdmin

    exit;
}
checkAdmin(0);
// 제거탭 출력 설정 하지 않은 경우 차단
if (!$d['admin']['uninstall']) {
    getLink('', '', _LANG('a0001', 'admin'), '');
}
// FTP 삭제
if ($d['admin']['ftp_use'] && $d['admin']['ftp']) {
    getLink('', '', _LANG('ab001', 'admin'), '');
} else {
    foreach ($table as $key => $val) {
        db_query('drop table ' . $val, $DB_CONNECT);
    }
    include $g['path_core'] . 'function/dir.func.php';
    DirDelete('./');
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script>
top.location.href = 'http://<?php 
echo $_SERVER['HTTP_HOST'];
?>
/';
</script>
</head>
<body></body>
开发者ID:hanacody,项目名称:rb2,代码行数:31,代码来源:a.uninstall.php

示例4: getLink

if (!$R['id']) {
    getLink('', '', '존재하지 않는 모듈입니다.', '');
}
if ($R['system']) {
    getLink('', '', '시스템모듈은 삭제할 수 없습니다.', '');
}
getDbDelete($table['s_module'], "id='" . $moduleid . "'");
include_once $g['path_core'] . 'function/dir.func.php';
$table_db = $g['path_module'] . $moduleid . '/_setting/db.table.php.done';
$_tmptfile = $g['path_var'] . 'table.info.php';
if (is_file($table_db)) {
    $module = $moduleid;
    $_table = $table;
    $table = array();
    include_once $table_db;
    $fp = fopen($_tmptfile, 'w');
    fwrite($fp, "<?php\n");
    foreach ($_table as $key => $val) {
        if (!$table[$key]) {
            fwrite($fp, "\$table['{$key}'] = \"{$val}\";\n");
        }
    }
    fwrite($fp, "?>");
    fclose($fp);
    @chmod($_tmptfile, 0707);
    foreach ($table as $key => $val) {
        db_query('drop table ' . $val, $DB_CONNECT);
    }
}
DirDelete($g['path_module'] . $R['id']);
getLink($g['s'] . '/?r=' . $r . '&m=admin&panel=Y&pickmodule=' . $m, 'parent.parent.', '', '');
开发者ID:hanacody,项目名称:rb2,代码行数:31,代码来源:a.module_delete.php

示例5: checkAdmin

<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
include_once $g['path_core'] . 'function/dir.func.php';
if ($type == 'module') {
    DirDelete($g['path_module'] . $pack);
}
if ($type == 'layout') {
    DirDelete($g['path_layout'] . $pack);
}
if ($type == 'widget') {
    DirDelete($g['path_widget'] . str_replace('.', '', str_replace('./widgets/', '', $pack)));
}
if ($type == 'switch') {
    DirDelete($g['path_switch'] . $pack);
}
if ($type == 'bbstheme') {
    DirDelete($g['path_module'] . 'bbs/theme/' . $pack);
}
if ($type == 'widget') {
    getLink($g['s'] . '/?r=' . $r . '&m=admin&module=' . $m . '&front=pack&type=widget', 'parent.', '', '');
} else {
    getLink('reload', 'parent.', '', '');
}
开发者ID:eosliebe,项目名称:rb,代码行数:27,代码来源:a.pack_delete.php

示例6: explode

                continue;
            }
            $_r = explode("\t", $_val);
            $_p = getDbData($table['s_page'], "id='" . $_r[3] . "'", 'uid');
            if ($_p['uid']) {
                getDbUpdate($table['s_page'], "pagetype='" . $_r[0] . "',ismain='" . $_r[1] . "',mobile='" . $_r[2] . "',id='" . $_r[3] . "',category='" . $_r[4] . "',name='" . $_r[5] . "',layout='" . $_r[6] . "',joint='" . $_r[7] . "',sosokmenu='" . $_r[8] . "'", 'uid=' . $_p['uid']);
            } else {
                getDbInsert($table['s_page'], 'pagetype,ismain,mobile,id,category,name,layout,joint,sosokmenu', "'" . $_r[0] . "','" . $_r[1] . "','" . $_r[2] . "','" . $_r[3] . "','" . $_r[4] . "','" . $_r[5] . "','" . $_r[6] . "','" . $_r[7] . "','" . $_r[8] . "'");
            }
        }
    }
    if ($aply_bbs == '1') {
        $maxgid = getDbCnt($table['bbslist'], 'max(gid)', '');
        $_bbs = file('./_package/dump_bbs.dat');
        foreach ($_bbs as $_val) {
            if (!trim($_val)) {
                continue;
            }
            $_r = explode("\t", $_val);
            $_p = getDbData($table['bbslist'], "id='" . $_r[0] . "'", 'uid');
            if ($_p['uid']) {
                continue;
            }
            $maxgid++;
            getDbInsert($table['bbslist'], 'gid,id,name,category,imghead,imgfoot,puthead,putfoot', "'" . $maxgid . "','" . $_r[0] . "','" . $_r[1] . "','" . $_r[2] . "','" . $_r[3] . "','" . $_r[4] . "','" . $_r[5] . "','" . $_r[6] . "'");
        }
    }
    DirCopy('./_package/rb', './');
    DirDelete('./_package');
    getLink('reload', 'parent.', '패키지가 적용되었습니다.', '');
}
开发者ID:eosliebe,项目名称:rb,代码行数:31,代码来源:a.package_upload.php

示例7: checkAdmin

<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
if (trim($theme) && is_dir($g['dir_module'] . 'theme/' . $theme)) {
    include_once $g['path_core'] . 'function/dir.func.php';
    DirDelete($g['dir_module'] . 'theme/' . $theme);
}
getLink($g['s'] . '/?r=' . $r . '&m=admin&module=' . $m . '&front=skin', 'parent.', '', '');
开发者ID:kiminmug,项目名称:rb_module_bbs,代码行数:11,代码来源:a.theme_delete.php

示例8: checkAdmin

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
if (!$layout) {
    exit;
}
if ($imgfile) {
    unlink($g['path_layout'] . $layout . '/image/' . $imgfile);
    getLink($g['s'] . '/?r=' . $r . '&m=admin&module=' . $m . '&front=main&layout=' . $layout . '&type=image', 'parent.', '', '');
}
if ($numSub) {
    if ($numSub == 1) {
        include $g['path_core'] . 'function/dir.func.php';
        DirDelete($g['path_layout'] . $layout);
        getLink($g['s'] . '/?r=' . $r . '&m=admin&module=' . $m, 'parent.', '', '');
    } else {
        $cssfile = str_replace('.php', '.css', $sublayout);
        $jsfile = str_replace('.php', '.js', $sublayout);
        unlink($g['path_layout'] . $layout . '/' . $sublayout);
        if (is_file($g['path_layout'] . $layout . '/' . $cssfile)) {
            unlink($g['path_layout'] . $layout . '/' . $cssfile);
        }
        if (is_file($g['path_layout'] . $layout . '/' . $jsfile)) {
            unlink($g['path_layout'] . $layout . '/' . $jsfile);
        }
        getLink($g['s'] . '/?r=' . $r . '&m=admin&module=' . $m . '&layout=' . $layout, 'parent.', '', '');
    }
}
if ($numCopy == 1) {
开发者ID:hanacody,项目名称:rb2,代码行数:30,代码来源:a.layout_delete.php

示例9: checkAdmin

<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
if ($pwd && substr($pwd, 0, 10) == $g['r'] . '/widgets/' && strlen($pwd) > 10) {
    include_once $g['path_core'] . 'function/dir.func.php';
    DirDelete($pwd);
    $pwd_exp = explode('/', $pwd);
    $pwd_len = count($pwd_exp);
    $pwd_str = '';
    for ($i = 0; $i < $pwd_len - 2; $i++) {
        $pwd_str .= $pwd_exp[$i] . '/';
    }
    getLink($g['s'] . '/?r=' . $r . '&m=admin&module=' . $m . '&pwd=' . $pwd_str . '&front=main', 'parent.', '', '');
} else {
    getLink('', '', '', '');
}
开发者ID:hoya0704,项目名称:trevia.co.kr,代码行数:19,代码来源:a.widget_delete.php

示例10: checkAdmin

<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
if (is_file($g['dir_module'] . 'component/' . $compo . '/main.php')) {
    include_once $g['path_core'] . 'function/dir.func.php';
    DirDelete($g['dir_module'] . 'component/' . $compo);
}
getLink('reload', 'parent.', '', '');
开发者ID:hoya0704,项目名称:trevia.co.kr,代码行数:11,代码来源:a.compo_delete.php

示例11: checkAdmin

<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
include $g['path_core'] . 'function/dir.func.php';
$w_dir = $g['path_tmp'] . 'widget';
DirDelete($w_dir);
mkdir($w_dir, 0707);
@chmod($w_dir, 0707);
getLink('reload', 'parent.', '위젯 캐시가 재생성 되었습니다.', '');
开发者ID:eosliebe,项目名称:rb,代码行数:12,代码来源:a.clear_wcache.php

示例12: db_query

<?php

db_query('ALTER TABLE ' . $table['s_seo'] . ' CHANGE `description` `description` TEXT NOT NULL', $DB_CONNECT);
db_query('ALTER TABLE ' . $table['s_page'] . ' ADD `member` INT default 0 NOT NULL ', $DB_CONNECT);
db_query('ALTER TABLE ' . $table['s_page'] . ' ADD `extra` TEXT NOT NULL ', $DB_CONNECT);
DirDelete($g['path_switch'] . 'end/visitercheck');
开发者ID:hanacody,项目名称:rb2,代码行数:6,代码来源:_update.php

示例13: checkAdmin

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
if ($isdelete) {
    include $g['path_core'] . 'function/dir.func.php';
    foreach ($pluginmembers as $plg) {
        if ($isdelete == '1') {
            DirDelete($g['path_plugin'] . $plg);
        }
        if ($isdelete == '2') {
            if (is_file($g['path_plugin'] . $plg . '/size.txt')) {
                unlink($g['path_plugin'] . $plg . '/size.txt');
            }
            DirDelete($g['path_plugin'] . $plg . '/' . $ov[$plg]);
        }
    }
    getLink($g['s'] . '/?r=' . $r . '&m=' . $m . '&module=' . $m . '&front=plugin&resave=Y', 'parent.', '', '');
} else {
    $_tmpdfile = $g['path_var'] . 'plugin.var.php';
    $fp = fopen($_tmpdfile, 'w');
    fwrite($fp, "<?php\n");
    foreach ($ov as $_key_ => $_val_) {
        fwrite($fp, "\$d['ov']['" . $_key_ . "'] = '" . trim($_val_) . "';\n");
    }
    fwrite($fp, "?>");
    fclose($fp);
    @chmod($_tmpdfile, 0707);
    getLink($g['s'] . '/?r=' . $r . '&m=' . $m . '&module=' . $m . '&front=plugin', 'parent.', '', '');
}
开发者ID:hanacody,项目名称:rb2,代码行数:30,代码来源:a.plugin_config.php

示例14: checkAdmin

<?php

if (!defined('__KIMS__')) {
    exit;
}
checkAdmin(0);
$deletePlugins = '.';
if ($isdelete) {
    include $g['path_core'] . 'function/dir.func.php';
    foreach ($pluginmembers as $plg) {
        if ($isdelete == '1') {
            DirDelete($g['path_core'] . 'plugins/' . $plg);
        }
        if ($isdelete == '2') {
            DirDelete($g['path_core'] . 'plugins/' . $plg . '/' . $ov[$plg]);
        }
    }
} else {
    $_tmpdfile = $g['path_var'] . 'plugin.var.php';
    $fp = fopen($_tmpdfile, 'w');
    fwrite($fp, "<?php\n");
    foreach ($ov as $_key_ => $_val_) {
        fwrite($fp, "\$d['ov']['" . $_key_ . "'] = '" . trim($_val_) . "';\n");
    }
    fwrite($fp, "?>");
    fclose($fp);
    @chmod($_tmpdfile, 0707);
}
getLink('reload', 'parent.', '', '');
开发者ID:eosliebe,项目名称:rb,代码行数:29,代码来源:a.plugin_config.php

示例15: move_uploaded_file

    move_uploaded_file($tmpname, $saveFile);
    require $g['path_core'] . 'opensrc/unzip/ArchiveExtractor.class.php';
    require $g['path_core'] . 'function/dir.func.php';
    $extractor = new ArchiveExtractor();
    $extractor->extractArchive($saveFile, $extPath1);
    unlink($saveFile);
    $opendir = opendir($extPath1);
    while (false !== ($file = readdir($opendir))) {
        if ($file != '.' && $file != '..') {
            if (is_file($extPath1 . $file)) {
                if (is_file($folder . $file)) {
                    unlink($folder . $file);
                }
                copy($extPath1 . $file, $folder . $file);
                @chmod($folder . $file, 0707);
            } else {
                if (!is_dir($folder . $file)) {
                    mkdir($folder . $file, 0707);
                    @chmod($folder . $file, 0707);
                }
                DirCopy($extPath1 . $file, $folder . $file);
                DirChmod($folder . $file, 0707);
            }
        }
    }
    closedir($opendir);
    DirDelete($extPath);
    mkdir($extPath, 0707);
    @chmod($extPath, 0707);
}
getLink('reload', 'parent.', '자료가 정상적으로 등록되었습니다.', '');
开发者ID:hoya0704,项目名称:trevia.co.kr,代码行数:31,代码来源:a.etc_pack_upload.php


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