php windows 配置虚拟目录 php 在windows下配置虚拟目录的方法介绍

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

php windows 配置虚拟目录 php 在windows下配置虚拟目录的方法介绍

  2021-03-18 我要评论
想了解php 在windows下配置虚拟目录的方法介绍的相关内容吗,在本文为您仔细讲解php windows 配置虚拟目录的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:php,windows,配置虚拟目录,下面大家一起来学习吧。
先打开Apache的conf目录下的httpd.conf文件,在末尾添加如下代码:
复制代码 代码如下:

<VirtualHost *:80>
 ServerName www.mydemo.com
 DocumentRoot "D:/mydemo"
<Directory "D:/mydemo">
 Options FollowSymLinks IncludesNOEXEC Indexes
 DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
 AllowOverride Options FileInfo
 Order Deny,Allow
 Allow from all
</Directory>
</VirtualHost>

再到C:->Windows->System32->drivers->etc目录,打开hosts文件。
在末尾添加如下代码:
复制代码 代码如下:

127.0.0.1 www.mydemo.com

然后再创建D:\mydemo目录
再然后重启一下apache服务器。
在浏览器输入www.mydemo.com看看

猜您喜欢

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们