Skip to content
Advertisement

move_uploaded_file function save to different directory folder problem

I am using move_uploaded_file function to save my file into two folders, the folders name are uploads_meeting_document and uploads_filing_file. It just can let me upload my file to this folder name uploads_meeting_document, it can’t save to uploads_filing_filefolder. Anyone can guide me which part I have problem in below the coding:

JavaScript

Below is my file path need to save to these folders(red arrow there) Output1

Advertisement

Answer

In your example, the second move_uploaded_file does not work, because the file was already moved to /upload_meeting_document

You will need to copy your file from there:

JavaScript

In case this does not work, you may have insufficient permissions for the /uploads_filing_file directory. Chech its owner and permissions.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement