首页 >后端开发 >php教程 >关于php使用fopen报错 failed to open stream: Permission denied

关于php使用fopen报错 failed to open stream: Permission denied

WBOY
WBOY原创
2016-08-08 09:32:125136浏览

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

从这里:http://stackoverflow.com/questions/10376048/fopen-permission-denied-on-a-file-with-777-permissions

看到这句话:

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

然后我的文件在这里:

/Users/andy/Downloads/wz_1223.csv

我把他mv到/usr/local/webdata/目录下

然后就可以了~~~果然是目录的权限问题。。。

以上就介绍了关于php使用fopen报错 failed to open stream: Permission denied,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn