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

How to set the root directory in php

王林
王林Original
2020-08-20 15:15:496358browse

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">

(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">

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!

Statement:
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