简体   繁体   English

禁止访问XAMPP服务器上的文件

[英]Access forbidden for file on xampp server

I'm using xampp on mac osx for developing a php web app. 我在Mac OS X上使用xampp开发php Web应用程序。 I'm using the Yii MVC framework to build the app. 我正在使用Yii MVC框架来构建应用程序。 I'm trying to access a php file via an ajax function and I keep getting this error 我正在尝试通过ajax函数访问php文件,但始终收到此错误

Access Forbidden: You don't have permission to access the requested object. 禁止访问:您无权访问所请求的对象。 It is either read-protected or not readable by the server 服务器已对其进行了读保护或不可读

So the php file with the ajax function in it is in the same folders as the php file that it's trying to access. 因此,带有ajax函数的php文件与它尝试访问的php文件位于同一文件夹中。 I've set the folder to chmod 777, which I assumed would probably do nothing anyway, I was right. 我已将文件夹设置为chmod 777,我认为该文件夹可能什么也不会做,我是对的。

Any ideas what this might be? 任何想法可能是什么?

That's certainly a problem on your Apache configuration. 这肯定是您的Apache配置上的问题。 Maybe you can't access this directory? 也许您无法访问该目录? Have a look to you .htaccess file(s), or the virtual host config 看看.htaccess文件或虚拟主机配置

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

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