學習php時,能藉助apache訪問*.php,但訪問不了檔案夾
學習php時,能藉助apache訪問*.php,但訪問不了檔案夾,比如訪問localhost,就會顯示如下資訊:
Forbidden
You don't have permission to access / on this server.
Apache/2.0.59 (Win32) PHP/5.1.6 Server at localhost Port 80
但訪問localhost/test.php就可以,在網上也查了別人的解決辦法
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
這裡改成
Options Indexes FollowSymLinks
AllowOverride None
按照上面改了後,問題還是沒解決,
------解決方案--------------------
加上下面兩句:
Order allow,deny
Allow from all
------解決方案--------------------
引用:
Quote: 引用:
加上下面兩句:
Order allow,deny
Allow from all
加上也不行,下面是我的httpt.conf檔案,請幫著看一下
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "C:/Program Files/Apache Group/Apache2" will be interpreted by the
# server as "C:/Program Files/Apache Group/Apache2/logs/foo.log".
#
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
# If a drive letter is omitted, the drive on which Apache.exe is located
# will be used by default. It is recommended that you always supply
# an explicit drive letter in absolute paths, however, to avoid
# confusion.
#
### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at );
# you will save yourself a lot of trouble.