0

Is it possible to add a local destination to method move_uploaded_file? example C:/foo/

I want to upload files, but store them outside the root folder, and use an alias to access the new destination.

Gabriel Diaconescu
  • 1,769
  • 3
  • 21
  • 31

2 Answers2

1

Here is the definition: bool move_uploaded_file ( string $filename , string $destination )

In $destination you can put any valid path. Be sure the directory security allows for writing for the user that webserver runs as.

Erwin Moller
  • 2,375
  • 14
  • 22
0

Found the problem. As I had the alias bar to point to my C:/foo/ path, in the PHP code I was adding bar to the $destination parameter.

It works if I set the parameter $destination to C:/foo/

Gabriel Diaconescu
  • 1,769
  • 3
  • 21
  • 31