백업 디렉토리 조회하기
백업을 하고 나면
백업이 되었는지 확인하기 위해
해당 디렉토리를 조회해볼 필요가 있죠.
이렇게 하시면 됩니다.
$lines = array();
$directory = 'd:\backup';
if ($dh = opendir($directory)) {
while ($file = readdir($dh)) {
if ($file != ".." && $file != ".") {
$lines[] = $file;
echo $file."<br>";
}
}
closedir($dh);
} else {
print("Unable to open directory.");
}
백업이 되었는지 확인하기 위해
해당 디렉토리를 조회해볼 필요가 있죠.
이렇게 하시면 됩니다.
$lines = array();
$directory = 'd:\backup';
if ($dh = opendir($directory)) {
while ($file = readdir($dh)) {
if ($file != ".." && $file != ".") {
$lines[] = $file;
echo $file."<br>";
}
}
closedir($dh);
} else {
print("Unable to open directory.");
}
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인