How to set the project path in php: First open the "conf->httpd.conf" file in the apache directory; then modify and add the code to "Alias /php "F:/phpspace"
" That’s it.
Recommended: "PHP Video Tutorial"
Configuring the project virtual path in php
To set the php virtual directory, open the conf->httpd.conf file in the apache directory, find
#虚拟目录节点 <IfModule dir_module> #设置欢迎界面 DirectoryIndex index.php index.html index.htm Alias /php "F:/phpspace" #介绍“/php”是虚拟路径,"F:/phpspace" 是你项目存放的物理路径; <Directory "F:/phpspace"> #访问权限设置 Order allow,deny Allow from all </Directory> </IfModule>
After setting, save the file, restart apache, and access the project in the "F:/phpspace" directory through http://localhost/php/project name.
The above is the detailed content of How to set project virtual path in php. For more information, please follow other related articles on the PHP Chinese website!