最新回答 / qq_稻草人_57
① echo 用于输出数值变量或者是字符串。但使用echo来输出引用变量时,如数组,仅输出数组的名字;当输出一个对象时,服务器提示<Catchable fatal error: Object of class Person could not be converted to string>错误,错误显示echo只能用于输出字符串。② print_r(expression)的作用是输出一个数组,实际上参数expression的类型可为数值变量和引用变量。③ var_dump(expression...
2016-03-29
配置完多站点后,如果访问localhost打不开,看评论解决了。可能是因为Demo目录(你设置的根目录)没有绑定域名localhost。需要在修改httpd-vhosts.conf这一步,像添加域名test01.com那样,再添加上域名localhost的部分:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "A:/WampServer/Demo"
ServerName localhost
</VirtualHost>
这样之前的localhost就可以打开了。
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "A:/WampServer/Demo"
ServerName localhost
</VirtualHost>
这样之前的localhost就可以打开了。
2016-03-29