httpd.conf" file in the apache directory; then modify and add the code to "Alias /php "F:/phpspace" Home >
Article > Backend Development > How to set project virtual path in php 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" 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 794ea01c23a0d5c1a7b2f169e4879de9, and add the following code after 2071f931c9870be1bebed0bdda8305e7: 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!How to set project virtual path in php
#虚拟目录节点
<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>