폴더내 화일 다른 폴더로 이동. ftp대응으로

폴더내 화일 다른 폴더로 이동. ftp대응으로

더시민 0 633 0


if(isset($_GET['bo_table']) && $_GET['bo_table']) $bo_table = $_GET['bo_table'];
// Move all images files
$files = scandir($_SERVER["DOCUMENT_ROOT"]."/move/isos/data/file/".$bo_table);
$oripath = $_SERVER["DOCUMENT_ROOT"]."/move/isos/data/file/".$bo_table."/";
$targetpath = $_SERVER["DOCUMENT_ROOT"]."/data/file/".$bo_table."/";
foreach($files as $file){
    if(in_array($file,array(".","..")))continue;
        if( copy($oripath.$file, $targetpath.$files)){
        $delete[] = $oripath.$file;            
    }
}

if(is_array($delete)){
    foreach($delete as $dfile){
        unlink($dfile);
    }
}

0 Comments
제목
Category
Facebook Twitter GooglePlus KakaoStory KakaoTalk NaverBand