php如何搭建本地運行環境

安裝 xampp, 下載地址:自己百度


安裝之後修改httpd-vhosts.conf文件,文件目錄 xampp\apache\conf\extra\httpd-vhosts.conf

<VirtualHost *:80>
    DocumentRoot "F:\xampp\htdocs\works\guandan"
    ServerName guandan.local
</VirtualHost>


配置本地host文件,文件目錄 C:Windows\System32\drivers\etc\hosts

127.0.0.1 guandan.local

使127.0.0.1這個IP指向到上面的ServerName本地域名


執行xampp-control.exe文件 開啓Apache  MySQL


後面把地址的域名改成ServerName就可以本地調試了。

http://guandan.local/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章