php 在windows下配置虛擬目錄的方法介紹
更新時(shí)間:2013年06月26日 10:52:35 作者:
本篇文章在是對(duì)在windows下配置虛擬目錄的方法進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下
先打開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
然后再創(chuàng)建D:\mydemo目錄
再然后重啟一下apache服務(wù)器。
在瀏覽器輸入www.mydemo.com看看
復(fù)制代碼 代碼如下:
<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文件。
在末尾添加如下代碼:
復(fù)制代碼 代碼如下:
127.0.0.1 www.mydemo.com
然后再創(chuàng)建D:\mydemo目錄
再然后重啟一下apache服務(wù)器。
在瀏覽器輸入www.mydemo.com看看
相關(guān)文章
PHP中unset,array_splice刪除數(shù)組中元素的區(qū)別
php中刪除數(shù)組元素是非常的簡單的,但有時(shí)刪除數(shù)組需要對(duì)索引進(jìn)行一些排序要求我們會(huì)使用到相關(guān)的函數(shù),這里我們來介紹使用unset,array_splice刪除數(shù)組中的元素區(qū)別吧2014-07-07php根據(jù)年月獲取當(dāng)月天數(shù)及日期數(shù)組的方法
這篇文章主要介紹了php根據(jù)年月獲取當(dāng)月天數(shù)及日期數(shù)組的方法,涉及php針對(duì)日期的相關(guān)判斷、轉(zhuǎn)換及字符與數(shù)組的遍歷操作相關(guān)技巧,需要的朋友可以參考下2016-11-11PHP 訪問數(shù)據(jù)庫配置通用方法(json)
目的是通過通用類訪問配置文件的方式,提供對(duì)數(shù)據(jù)庫連接的動(dòng)態(tài)獲取和設(shè)置,使開發(fā)時(shí)和生產(chǎn)應(yīng)用時(shí)都能夠提供靈活的、簡化的、解耦的操作方式,需要的朋友可以參考下2018-05-05php實(shí)現(xiàn)的返回?cái)?shù)據(jù)格式化類實(shí)例
這篇文章主要介紹了php實(shí)現(xiàn)的返回?cái)?shù)據(jù)格式化類及其應(yīng)用實(shí)例,包括針對(duì)XML、JSON等的格式化,非常具有實(shí)用價(jià)值,需要的朋友可以參考下2014-09-09