无法访问子文件夹中的php文件? [英] can not access the php file in the sub folders?

查看:33
本文介绍了无法访问子文件夹中的php文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重新安装apache ant php后,遇到一个问题,只有root文件夹下的php文件可以访问,root子文件夹下的php文件无法访问.

after re-install the apache ant php , I meet a problem, only the php file in the root folder can access, the php file in the sub folder of root can not access.

我使用的是 apache2.2 php4.3 和 codeigniter php 框架.

I am using apache2.2 php4.3 and codeigniter php framework.

    #apache config
    <Location /gl>
    </Location>
    Alias /gl /mnt/deploy/hospital


when I put file in "http://.../gl/application/controllers/test1.php", the browser report 500 error, and I check the /var/log/apache2/error.log no php error find.

when I put file in "http://.../gl/test1.php" thing's ok.

推荐答案

你必须告诉 apache 谁可以访问别名.

You have to tell apache who is allowed to access the alias.

试试

Alias /gl /mnt/deploy/hospital
<Directory "/mnt/deploy/hospital">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order Deny,Allow
    Deny from all
    Allow from localhost 127.0.0.1

</Directory>

如果必须,并且您不在本地测试环境中工作,请使用 :-

If you must, and you are not working on a local testing environment use :-

Allow from all

代替

Allow from localhost 127.0.0.1

这篇关于无法访问子文件夹中的php文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆