最赞回答 / 調故荢滒
第一个echo是常量PI的结果;第二个echo是先把字符串PII赋值给$p,然后把$p定义为常量,也就是把PII定义为常量;第三个echo就是输出一个字符串啊,所以结果是PII。
2016-03-23
<VirtualHost *:80>
DocumentRoot "E:/demo/test01"
ServerName test01.com
<Directory "E:/demo/test01">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
DocumentRoot "E:/demo/test01"
ServerName test01.com
<Directory "E:/demo/test01">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
2016-03-22
<VirtualHost *:80>
DocumentRoot "E:/demo/test02"
ServerName test02.com
<Directory "E:/demo/test02">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
DocumentRoot "E:/demo/test02"
ServerName test02.com
<Directory "E:/demo/test02">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
2016-03-22
<VirtualHost *:80>
DocumentRoot "E:/demo"
ServerName localhost
<Directory "E:/demo">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
DocumentRoot "E:/demo"
ServerName localhost
<Directory "E:/demo">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
2016-03-22
我来说一下2.5版本如何正确建多站点 首先httpd.conf这个文件只需将#Include conf/extra/httpd-autoindex.conf的#去掉 其他无需修改,你也找不到。然后httpd-vhosts.conf里 把这三段语句放进去 路径自己修改 (注意 如果你之前改了监听端口,这里的80要改掉 还有就是一定要将路径改为你自身的!)(hosts文件照视屏中修改就行了 就是127.0.0.1 test01.com 127.0.0.1 test02.com)(最后重启服务即可 这是我实测的 没有任何问题)
2016-03-22