#266 경로수정
This commit is contained in:
@ -3,7 +3,7 @@ $sub_menu = "100900";
|
||||
include_once("./_common.php");
|
||||
|
||||
if ($is_admin != "super")
|
||||
alert("최고관리자만 접근 가능합니다.", $g4[path]);
|
||||
alert("최고관리자만 접근 가능합니다.", G4_URL);
|
||||
|
||||
$g4['title'] = "캐시파일 일괄삭제";
|
||||
include_once("./admin.head.php");
|
||||
@ -21,27 +21,27 @@ include_once("./admin.head.php");
|
||||
include_once("./admin.tail.php");
|
||||
flush();
|
||||
|
||||
if (!$dir=@opendir($g4['cache_latest_path'])) {
|
||||
echo "최신글 캐시디렉토리를 열지못했습니다.";
|
||||
}
|
||||
if (!$dir=@opendir(G4_DATA_PATH.'/cache')) {
|
||||
echo "최신글 캐시디렉토리를 열지못했습니다.";
|
||||
}
|
||||
|
||||
$cnt=0;
|
||||
while($file=readdir($dir)) {
|
||||
while($file=readdir($dir)) {
|
||||
if ($file=='.' || $file=='..') continue;
|
||||
|
||||
$cache_file = $g4['cache_latest_path'].'/'.$file;
|
||||
$cache_file = G4_DATA_PATH.'/cache/'.$file;
|
||||
|
||||
if (!$atime=@fileatime($cache_file))
|
||||
continue;
|
||||
if (!$atime=@fileatime($cache_file))
|
||||
continue;
|
||||
|
||||
$cnt++;
|
||||
$return = unlink($cache_file);
|
||||
$return = unlink($cache_file);
|
||||
echo "<script>document.getElementById('delete_message').innerHTML += '{$cache_file}<br/>';</script>\n";
|
||||
|
||||
flush();
|
||||
|
||||
if ($cnt%10==0)
|
||||
if ($cnt%10==0)
|
||||
echo "<script>document.getElementById('delete_message').innerHTML = '';</script>\n";
|
||||
}
|
||||
}
|
||||
echo "<script>document.getElementById('delete_message').innerHTML += '최신글 캐시파일 {$cnt}건 삭제 완료.<br><br>프로그램의 실행을 끝마치셔도 좋습니다.';</script>\n";
|
||||
?>
|
||||
|
||||
@ -3,7 +3,7 @@ $sub_menu = "100800";
|
||||
include_once("./_common.php");
|
||||
|
||||
if ($is_admin != "super")
|
||||
alert("최고관리자만 접근 가능합니다.", $g4[path]);
|
||||
alert("최고관리자만 접근 가능합니다.", G4_URL);
|
||||
|
||||
$g4['title'] = "세션파일 일괄삭제";
|
||||
include_once("./admin.head.php");
|
||||
@ -21,31 +21,31 @@ include_once("./admin.head.php");
|
||||
include_once("./admin.tail.php");
|
||||
flush();
|
||||
|
||||
if (!$dir=@opendir($g4['session_path'])) {
|
||||
echo "세션 디렉토리를 열지못했습니다.";
|
||||
}
|
||||
if (!$dir=@opendir(G4_DATA_PATH.'/session')) {
|
||||
echo "세션 디렉토리를 열지못했습니다.";
|
||||
}
|
||||
|
||||
$cnt=0;
|
||||
while($file=readdir($dir)) {
|
||||
while($file=readdir($dir)) {
|
||||
|
||||
if (!strstr($file,'sess_')) continue;
|
||||
if (strpos($file,'sess_')!=0) continue;
|
||||
if (!strstr($file,'sess_')) continue;
|
||||
if (strpos($file,'sess_')!=0) continue;
|
||||
|
||||
$session_file = $g4['session_path'].'/'.$file;
|
||||
$session_file = G4_DATA_PATH.'/session/'.$file;
|
||||
|
||||
if (!$atime=@fileatime($session_file)) {
|
||||
continue;
|
||||
}
|
||||
if (!$atime=@fileatime($session_file)) {
|
||||
continue;
|
||||
}
|
||||
if (time() > $atime + (3600 * 6)) { // 지난시간을 초로 계산해서 적어주시면 됩니다. default : 6시간전
|
||||
$cnt++;
|
||||
$return = unlink($session_file);
|
||||
$return = unlink($session_file);
|
||||
echo "<script>document.getElementById('ct').innerHTML += '{$session_file}<br/>';</script>\n";
|
||||
|
||||
flush();
|
||||
|
||||
if ($cnt%10==0)
|
||||
echo "<script>document.getElementById('ct').innerHTML = '';</script>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "<script>document.getElementById('ct').innerHTML += '세션데이터 {$cnt}건 삭제 완료.<br><br>프로그램의 실행을 끝마치셔도 좋습니다.';</script>\n";
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user