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

先打开Apache的conf目录下的httpd.conf文件,在末尾添加如下代码
<div class="codetitle"><a style="CURSOR: pointer" data="74660" class="copybut" id="copybut74660" onclick="doCopy('code74660')"> 代码如下:

<div class="codebody" id="code74660">
<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



再到C:->Windows->System32->drivers->etc目录,打开hosts文件
在末尾添加如下代码
<div class="codetitle"><a style="CURSOR: pointer" data="66374" class="copybut" id="copybut66374" onclick="doCopy('code66374')"> 代码如下:
<div class="codebody" id="code66374">
127.0.0.1 www.mydemo.com

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

windowswindows配置虚拟目录

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...