Hi,
I am writing a site where a site admin can upload files. I think I am running into directioy permission issues.
I want the site admin to upload files into its images directory. admin authentication is saved in mysql database. Is there a way that I have it uploaded into the "images" subdirectory?
Here's the code excerpt:
....
$upfile = get_cwd() . '/images/' . $userfile_name;
....
if (is_uploaded_file($userfile))
{
if (!move_uploaded_file($userfile, $upfile))
{
echo 'Problem: Could not move file to destination directory';
return('');
}
}
This is not working. But, if I change $upfile to /tmp. it works! This leads me to believe that the user does not have write permission to the images directory. Can I change dir permissions?