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.
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!