Home > Backend Development > PHP Tutorial > About php using fopen error failed to open stream: Permission denied

About php using fopen error failed to open stream: Permission denied

WBOY
Release: 2016-08-08 09:32:12
Original
5154 people have browsed it

andy@AndyMacBookPro:~/Downloads$ ll wz_1223.csv
-rwxrwxrwx 1 andy staff 42082362 12 23 14:09 wz_1223.csv*
andy@AndyMacBookPro:~/Downloads$

Warning: fopen(/Users/andy /Downloads/wz_1223.csv): failed to open stream: Permission denied in /usr/local/webdata/andy/fanli/job/job1.php on line 16

From here: http://stackoverflow .com/questions/10376048/fopen-permission-denied-on-a-file-with-777-permissions

See this sentence:

I'll have a look at whether safe mode is enabled. As for the folder, the permissions are also set to 777. – personne3000May 2 '12 at 16:37

Then my file is here:

/Users/andy/Downloads/wz_1223.csv

I mv him to /usr/local/ Under the webdata/ directory

and then it’s ok~~~ It turns out to be a permission issue with the directory. . .

The above introduces the error failed to open stream: Permission denied when using fopen in PHP, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template