I call the move_uploaded_file on my code twice but seems that the second one doesn’t work.
If I interchange the position of them,
then first one will works, but the second won’t.
any suggestion?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t move a file twice. Perhaps you are looking for
copy(). When you move the file, the original doesn’t exists anymore.Docs: http://php.net/copy
You could use
move_uploaded_fileand copy the file from there again