怎么看apache的根目录?我怎么导入的CSS文件找不到?
请问这里面,哪个是服务器的在本机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>
<code>为什么我在www文件下定义了一个css文件,用:<link rel="stylesheet" type="text css" href="/css.css"> 不行!</code>
<code>而用:<link rel="stylesheet" type="text css" href="/www/css.css"> 就行了???</code>
根目录不是 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>
<code>为什么我在www文件下定义了一个css文件,用:<link rel="stylesheet" type="text css" href="/css.css"> 不行!</code>
<code>而用:<link rel="stylesheet" type="text css" href="/www/css.css"> 就行了???</code>
根目录不是 C:/AppServ/www 吗?
看 DOCUMENT_ROOT
apache
的httpd.conf
文件 搜索DocumentRoot
查看apache指定的根目录

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PHP uses MySQLi and PDO extensions to interact in database operations and server-side logic processing, and processes server-side logic through functions such as session management. 1) Use MySQLi or PDO to connect to the database and execute SQL queries. 2) Handle HTTP requests and user status through session management and other functions. 3) Use transactions to ensure the atomicity of database operations. 4) Prevent SQL injection, use exception handling and closing connections for debugging. 5) Optimize performance through indexing and cache, write highly readable code and perform error handling.

PHP is used to build dynamic websites, and its core functions include: 1. Generate dynamic content and generate web pages in real time by connecting with the database; 2. Process user interaction and form submissions, verify inputs and respond to operations; 3. Manage sessions and user authentication to provide a personalized experience; 4. Optimize performance and follow best practices to improve website efficiency and security.

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

PHP is a server-side scripting language used for dynamic web development and server-side applications. 1.PHP is an interpreted language that does not require compilation and is suitable for rapid development. 2. PHP code is embedded in HTML, making it easy to develop web pages. 3. PHP processes server-side logic, generates HTML output, and supports user interaction and data processing. 4. PHP can interact with the database, process form submission, and execute server-side tasks.

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

To get Nginx to run Apache, you need to: 1. Install Nginx and Apache; 2. Configure the Nginx agent; 3. Start Nginx and Apache; 4. Test the configuration to ensure that you can see Apache content after accessing the domain name. In addition, you need to pay attention to other matters such as port number matching, virtual host configuration, and SSL/TLS settings.

Deploying a ZooKeeper cluster on a CentOS system requires the following steps: The environment is ready to install the Java runtime environment: Use the following command to install the Java 8 development kit: sudoyumininstalljava-1.8.0-openjdk-devel Download ZooKeeper: Download the version for CentOS (such as ZooKeeper3.8.x) from the official ApacheZooKeeper website. Use the wget command to download and replace zookeeper-3.8.x with the actual version number: wgethttps://downloads.apache.or
