Answer the question
In order to leave comments, you need to log in
Why is access denied on the local server?
Good afternoon.
on my local server (apache, mac os) for some reason I can't upload the file to the server through the form, they write that access is denied,
Warning: copy(/Users/kolibry/sites/zagruz4ik/inbox/1.jpg): failed to open stream: Permission denied in /Users/kolibry/sites/zagruz4ik/my_csv.php on line 14
$uploaddir = '/Users/kolibry/sites/zagruz4ik/inbox/';
$uploadfile = $uploaddir.basename($_FILES['csvfile']['name']);
if (copy($_FILES['csvfile']['tmp_name'], $uploadfile)) /*14строка*/
{
echo "<h3> ну наконец-то :)</h3>";
}
Answer the question
In order to leave comments, you need to log in
The directory must have write and execute permissions, the file (if any) must have write permissions.
And don't forget to specify under what name the web service is running, because the form will try to write on its behalf.
If I'm not mistaken, the rights should be 755 and check the rights of the file.
https://developer.apple.com/library/mac/documentat...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question