怎么看apache的根目录?我怎么导入的CSS文件找不到?

WBOY
Release: 2016-06-06 20:08:02
Original
1595 people have browsed it

请问这里面,哪个是服务器的在本机windows的根目录?

<code>Variable    Value
HTTP_HOST    localhost
HTTP_CONNECTION    keep-alive
HTTP_ACCEPT    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT    Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Maxthon/4.4.8.1000 Chrome/30.0.1599.101 Safari/537.36
HTTP_DNT    1
HTTP_REFERER    http://localhost/
HTTP_ACCEPT_ENCODING    gzip,deflate
HTTP_ACCEPT_LANGUAGE    zh-CN
PATH    C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;
SystemRoot    C:\Windows
COMSPEC    C:\Windows\system32\cmd.exe
PATHEXT    .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR    C:\Windows
SERVER_SIGNATURE    no value
SERVER_SOFTWARE    Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/5.6.18
SERVER_NAME    localhost
SERVER_ADDR    ::1
SERVER_PORT    80
REMOTE_ADDR    ::1
DOCUMENT_ROOT    C:/AppServ/www
REQUEST_SCHEME    http
CONTEXT_PREFIX    no value
CONTEXT_DOCUMENT_ROOT    C:/AppServ/www
SERVER_ADMIN    admin@example.com
SCRIPT_FILENAME    C:/AppServ/www/info.php
REMOTE_PORT    49557
GATEWAY_INTERFACE    CGI/1.1
SERVER_PROTOCOL    HTTP/1.1
REQUEST_METHOD    GET
QUERY_STRING    no value
REQUEST_URI    /info.php
SCRIPT_NAME    /info.php</code>
Copy after login
Copy after login
<code>为什么我在www文件下定义了一个css文件,用:<link rel="stylesheet" type="text css" href="/css.css">
不行!</code>
Copy after login
Copy after login
<code>而用:<link rel="stylesheet" type="text css" href="/www/css.css">
就行了???</code>
Copy after login
Copy after login

根目录不是 C:/AppServ/www 吗?

回复内容:

请问这里面,哪个是服务器的在本机windows的根目录?

<code>Variable    Value
HTTP_HOST    localhost
HTTP_CONNECTION    keep-alive
HTTP_ACCEPT    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT    Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Maxthon/4.4.8.1000 Chrome/30.0.1599.101 Safari/537.36
HTTP_DNT    1
HTTP_REFERER    http://localhost/
HTTP_ACCEPT_ENCODING    gzip,deflate
HTTP_ACCEPT_LANGUAGE    zh-CN
PATH    C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;
SystemRoot    C:\Windows
COMSPEC    C:\Windows\system32\cmd.exe
PATHEXT    .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR    C:\Windows
SERVER_SIGNATURE    no value
SERVER_SOFTWARE    Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/5.6.18
SERVER_NAME    localhost
SERVER_ADDR    ::1
SERVER_PORT    80
REMOTE_ADDR    ::1
DOCUMENT_ROOT    C:/AppServ/www
REQUEST_SCHEME    http
CONTEXT_PREFIX    no value
CONTEXT_DOCUMENT_ROOT    C:/AppServ/www
SERVER_ADMIN    admin@example.com
SCRIPT_FILENAME    C:/AppServ/www/info.php
REMOTE_PORT    49557
GATEWAY_INTERFACE    CGI/1.1
SERVER_PROTOCOL    HTTP/1.1
REQUEST_METHOD    GET
QUERY_STRING    no value
REQUEST_URI    /info.php
SCRIPT_NAME    /info.php</code>
Copy after login
Copy after login
<code>为什么我在www文件下定义了一个css文件,用:<link rel="stylesheet" type="text css" href="/css.css">
不行!</code>
Copy after login
Copy after login
<code>而用:<link rel="stylesheet" type="text css" href="/www/css.css">
就行了???</code>
Copy after login
Copy after login

根目录不是 C:/AppServ/www 吗?

看 DOCUMENT_ROOT

apachehttpd.conf文件 搜索DocumentRoot查看apache指定的根目录

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template