예제 소스
target_tumb의 파일을 복사하여 new_thumb 위치에 파일명으로 복사
$target_thumb = 'uploadFile/board/data1_tn';
$new_thumb = 'uploadFile/newboard/data1_tn';
if(file_exists($target_thumb)) {
if(!copy($target_thumb, $newer_thumb)) {
echo '파일 복사 실패';
}
else {
echo '파일 복사 성공';
}
}
'개발 > php' 카테고리의 다른 글
php file('abc.txt'); text파일을 라인별 배열로 읽어오는 기능 예제 (0) | 2021.02.23 |
---|---|
php list 배열을 변수로 변환 예제 (0) | 2021.02.22 |
cron php 리눅스 명령어 정리 (0) | 2021.02.15 |
php  해결방법 (0) | 2021.02.01 |
php curl 수동 설치하기 Fatal error: Call to undefined function curl_init() (0) | 2021.01.28 |
댓글