第一:xampp软件中,F:6apacheconfextrahttpd-vhosts.conf文件中(复制粘贴):
代码语言:javascript复制<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "F:/6/htdocs/advanced/frontend/web"
ServerName www.yii2.com;
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
第二:C:WindowsSystem32driversetchosts文件中。复制粘贴即可.
代码语言:javascript复制127.0.0.1 www.yii2.com