简体   繁体   English

权限被拒绝错误调用fopen

[英]Permission denied error calling fopen

I use XAMPP on Leopard. 我在豹子上使用XAMPP。 I'm trying to create cache files using fopen but I get 我正在尝试使用fopen创建缓存文件,但是我得到了

Warning: fopen(/Applications/xampp/xamppfiles/htdocs/mysite/cache/index.php.cache) [function.fopen]: failed to open stream: Permission denied in /Applications/xampp/xamppfiles/htdocs/mysite/functions.php on line 26

I tried to change folder permissions using CMD+I in finder and setting read/write access for everyone, but did not work. 我试图在finder中使用CMD + I更改文件夹权限,并为所有人设置读写访问权限,但是没有用。

Got any ideas? 有任何想法吗?

Thanks! 谢谢!

You need to change permissions for that file, no the folder. 您需要更改该文件(而不是文件夹)的权限。

Anyway, if you try to change permissions but can't do it, maybe that means you don't have permissions to chmod at all! 无论如何,如果您尝试更改权限但不能更改权限,则可能意味着您根本没有chmod的权限!

If you have administrative privileges, try sudo chmod in terminal. 如果您具有管理特权,请在终端中尝试sudo chmod

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM