phpnow: 出现类似 open_basedir restriction in effect;file(。。)is not within the allowed path。。
下边还会有至少2行的Warning和Fatal error;
解决的方法有两个:
①:运行PnCp.cmd,选择0 -vhs 添加 虚拟主机
程序会列出现有的虚拟主机列表,在最下面输入要添加的虚拟主机的域名(也就是IIS下所谓的“主机头”)
输入主机别名(也就是将多个域名绑定到主机上,多个域名之间一定是要用空格隔开)
指定网站目录(也就是网站程序文件所在的文件夹)
[ 如果分配此主机给其他用户, 并限制其权限, 请输入 "y";否则, 请输入 "n". 默认 Y ]
-> 限制虚拟主机权限? (Y/n):这里请一定要输入“n”,不限制权限,否则将会出现前面所说的“open_basedir restriction in effect”的错误!
②可以在apache的conf\extra下的httpd-vhosts.conf文件对要添加的虚拟主机进行修改,如下:
<VirtualHost *>
</VirtualHost>