0
votes

What I have right now for file upload is:

move_uploaded_file($filetemp, "files/$filename");

With filetemp referring to $_FILES['fileupload']['tmp_name'], filename referring to $_FILES['fileupload']['name'], and files referring to a folder of that name inside the folder where the PHP file is.

However, this does not move the file to the files folder. How do I make it so that the function moves the file there?

Thanks!

Nerd With a Vengeance

1
are these folders set up with the right permissions? - bcosca
The permission for files is 777 - Andy Haskell

1 Answers

2
votes

There could be any number of reasons why this might not be working.

The first thing to check is permissions - make sure the webserver has write permissions to the directory you're trying to write to.
Also, turn your error reporting up - see what warnings are being generated on failure (assuming that you're return value is indeed false).