Hi I am using move_uploaded_file() to store a picture on my server but I am having problems getting the file to be stored in the correct directory. I want the file to be saved in a folder called 'pics' which is in the same directory as the .php file but it is always stored in the same directory as my .php file. Here is my code...
$updir = "pics/";
$upDir .= $_FILES['userfile']['name'];
$upDir = rawurlencode($upDir);
I've tried changing the line
$upDir = "pics/";
To many different thing but I always end up with the file saved in the parent directory of the pics folder (the parent directory of pics holds the .php file).
What am I missing? Thanks!