本文整理汇总了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);
}
示例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.', '', '');
示例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>
示例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.', '', '');
示例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.', '', '');
}
示例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.', '패키지가 적용되었습니다.', '');
}
示例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.', '', '');
示例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) {
示例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('', '', '', '');
}
示例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.', '', '');
示例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.', '위젯 캐시가 재생성 되었습니다.', '');
示例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');
示例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.', '', '');
}
示例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.', '', '');
示例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.', '자료가 정상적으로 등록되었습니다.', '');