How does php Upload a compressed file? I got an instance from the internet. I don't know where I was wrong and I didn't specify where to upload it.
Form part
Singleupload. php
If (move_uploaded_file ($ _ FILES ['upfile'] ['tmp _ name'], $ _ FILES ['upfile'] ['name']) {echo "file uploaded successfully!
";} Else {echo" file Upload failed!
";}
Reply to discussion (solution)
$ _ FILES ['upfile'] ['name']
Do you want to copy the temporary file to the original path of the uploaded file? Doomed to copy failure...
$ _ FILES ['upfile'] ['name']
Do you want to copy the temporary file to the original path of the uploaded file? Doomed to copy failure...
I don't quite understand a few questions. we all say that move_uploaded_file can be used for uploading.
But how does move_uploaded_file specify where the file comes from and where it comes from.
The server path is: D: \ phpnow \ htdocs \ wpgc \ wp-content \ files
Files directory on the server ..
Is singleupload. php in the files directory?
Is singleupload. php in the files directory?
No
Singleupload. php in D: \ phpnow \ htdocs \ wpgc \ wp-content \ themes \ MyBlog
If (move_uploaded_file ($ _ FILES ['upfile'] ['tmp _ name'], "... /.. /files /". $ _ FILES ['upfile'] ['name']) {
If (move_uploaded_file ($ _ FILES ['upfile'] ['tmp _ name'], "... /.. /files /". $ _ FILES ['upfile'] ['name']) {
Thank you very much for your success.
It means that when you click submit, the file has been uploaded, but uploaded to the current directory, that is, the temporary directory.
Is move_uploaded_file used to copy files to the desired directory?
Move_uploaded_file is mobile
Copy_uploaded_file is a copy.