QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 844|回复: 3

怎么限制PHP网页浏览web所在目录以外的目录?

[复制链接]
发表于 2003-12-19 15:46:27 | 显示全部楼层 |阅读模式
我记得有一个PHP的免费空间。
我的PHP文件管理器不能访问 web 所在目录以外的其他地方?!

在别的服务器上我甚至可以进入\etc\(有的win系统可以进入c:\windows\……)目录的~~
那个服务器是怎么设置的??
发表于 2003-12-19 16:11:44 | 显示全部楼层
在 apache 里面设置目录的权限。
回复

使用道具 举报

 楼主| 发表于 2003-12-19 16:24:40 | 显示全部楼层
详细一点~~
谢谢~~
回复

使用道具 举报

发表于 2003-12-19 16:28:14 | 显示全部楼层
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
    Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride None

#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all

</Directory>
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-15 09:24 , Processed in 0.045005 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表