Home > Backend Development > PHP Problem > How to set the root directory in php

How to set the root directory in php

王林
Release: 2023-03-04 21:08:01
Original
6389 people have browsed it

How to set the root directory in php: first open the httpd.conf configuration file under apache; then find the configuration [CocumentRoot "E:/php/Demo"]; finally set the root directory path as needed.

How to set the root directory in php

Specific method:

(Recommended tutorial: php graphic tutorial)

Open first httpd.conf file under Apache;

Then find the following configuration:

  DocumentRoot "E:/php/Demo"
  <Directory "E:/php/Demo">
Copy after login

(Video tutorial recommendation: php video tutorial)

Finally customize The root directory path is sufficient. For example, if you want to set the root directory path to "D:\Demo", change it to

 DocumentRoot "D:\Demo"
  <Directory "D:\Demo">
Copy after login

The above is the detailed content of How to set the root directory in php. For more information, please follow other related articles on the PHP Chinese website!

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