Hi
I have been working on a upload file that works fine on localhost (windows) but wont work on my linux server I rent. I want it to move it to a subdir '/files' from where the file is.
it gives the errors: Warning: move_uploaded_file(/home/taalhulp/domains/taalhulpmanager.nl/public_html/files/6) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/taalhulp/domains/taalhulpmanager.nl/public_html/Gegev_Dossier.php on line 66
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpFMaeAs' to '/home/taalhulp/domains/taalhulpmanager.nl/public_html/files/6' in /home/taalhulp/domains/taalhulpmanager.nl/public_html/Gegev_Dossier.php on line 66
Here is a simplified version of my code
$FotoMap = '/home/taalhulp/domains/taalhulpmanager.nl/public_html/files/' ;
if ($_POST['type'] == 'add' & strlen($_FILES['FileUpload']['name']) > 0 && strlen($_POST["GivenFileName"]) > 0 )
{
if (move_uploaded_file($_FILES['FileUpload']['tmp_name'], $FotoMap . $file_name_id))
{
$_SESSION['echo'] = 'succes';
}
else
{
$_SESSION['echo'] = 'fail';
}
}
it says permission denied but is that because I do something wrong or because i need to contact my provider to tell him to enable that, maybe you I can enable that myself?