進(jìn)入下載后的wampserver文件根目錄,
1.配置PHP,搜索php.ini文件
找到:short_open_tag = Off,改為On
2.?搜索http.conf文件
找到:#Include conf/extra/httpd-vhosts.conf,去掉前邊的#號
3.搜索httpd-vhosts.conf文件,最后加入類似內(nèi)容(文件路徑是自己安裝程序的路徑)
<VirtuslHost*:80>
ServerName www.***.cn? ? ? ? ? ? ? ? ? ? ? ?設(shè)置域名
DocumentRoot D:/WWW/sunluyi? ? ? ? ? 后臺源文件路徑
<Directory "D:/WWW/sunluyi/">
Options +Indexes +Includes +FollowSymLinks+MultiViews
AllowOverride All
Require local
</Directory>
</VirtuslHost>
4.打開C:\Windows\System32\drivers\etc
修改hosts 最后一行加入自己的域名
127.0.0.1 www.***.com
本文來源于:wampserver配置詳解
更多前端內(nèi)容請查看:孫魯意博客-更多前端小技巧