Copy
rename('../../폴더/$파일변수', '../../폴더2/$파일변수'); // rename('기존에 있는 파일','옮기려고 하는 파일')
이렇게 하는게 아닌가요? ㅠ,ㅠ
파일권한도 777로 바꿔는데... 이렇게 간단하지 않나요...ㅠㅠ
Copy
이것도 안되서 $tmp_file = "'../../폴더/$파일변수";$file_path = "'../../폴더1/$파일변수";copy($tmp_file, $file_path);//unlink("삭제할 파일");unlink("../../폴더/$파일변수");
이것도 안되네요 ㅠ,ㅠ
답변 2개
채택된 답변
+20 포인트
᠋᠋᠋᠋익명닉네임
10년 전
http://php.net/manual/en/function.copy.php
<?php
$file = 'example.txt';$newfile = 'example.txt.bak';
if (!copy($file, $newfile)) {
echo "failed to copy $file...\n";
}
?>
http://php.net/manual/en/function.unlink.php
보고 참고해보시길 바랍니다 .. ^_^
10년 전
폴더1 <--- 이 폴더가 없다면 생성부터 먼저 해주어야겠죠
답변을 작성하려면 로그인이 필요합니다.