当前位置:Gxlcms > PHP教程 > 关于php使用fopen报错failedtoopenstream:Permissiondenied

关于php使用fopen报错failedtoopenstream:Permissiondenied

时间:2021-07-01 10:21:17 帮助过:22人阅读

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教程有兴趣的朋友有所帮助。

人气教程排行