php file upload overwrite
본문
PHP로 파일 업로드 하는 부분을 구현해보고 있는데요.
업로드하는 파일과 같은 이름의 파일명이 존재하는 경우에 대한 처리를 하는데, 일단은
unlink(기존파일)
move_upload_file(업로드파일)
이런 식으로 구현을 했는데요.
바로 overwrite 하는 방법이 있을까요?
답변 1
move_uploaded_file()
Warning
If the destination file already exists, it will be overwritten.
http://kr1.php.net/manual/kr/function.move-uploaded-file.php
답변을 작성하시기 전에 로그인 해주세요.