user656925
user656925

Reputation:

How do I verify that files have been uploaded?

I used this code to find the temporary location of files(pictures) that users(me) upload to my site using a php upload script.

 echo sys_get_temp_dir();

returns

C:\Users\a\AppData\Local\Temp

When I look in the temp folder I see some files with .tmp so I don't know if they are the ones downloaded. I'm trying to troubleshoot my PHP upload script. This is because I want to first verify the actual files are downloaded before I use the php move function.

Upvotes: 0

Views: 96

Answers (2)

user823738
user823738

Reputation: 17531

You are looking for is_uploaded_file function.

Upvotes: 3

Shi
Shi

Reputation: 4258

Have a look at is_uploaded_file(). The $_FILES superglobal has information as well. And finally, the whole section about file uploads.

Upvotes: 5

Related Questions