在本地写并测试php程序test.php只有放到/var/www路径下才能识别
在浏览器中http://127.0.0.1/test.php才能找到并运行程序
我将test.php放到、home路径下就找不到了
我想着应该是超找路径设置的问题,但是不知道从哪修改该路径
?????????
php中如何设置路径
-
- 帖子: 448
- 注册时间: 2008-07-10 15:08
- be00
- 帖子: 805
- 注册时间: 2008-07-28 19:51
- 来自: 长沙
- 联系:
Re: php中如何设置路径
在配置文件/etc/apache2/apache2.conf里面修改主目录就可以
ServerRoot "/var/www"
-
- 帖子: 448
- 注册时间: 2008-07-10 15:08
Re: php中如何设置路径
be00,
很抱歉,我在该路径下没有找到你说的
ServerRoot "/var/www"
即便是我添加了这个还是不能在我设置的路径下查找
很抱歉,我在该路径下没有找到你说的
ServerRoot "/var/www"
即便是我添加了这个还是不能在我设置的路径下查找
-
- 帖子: 2
- 注册时间: 2008-04-26 13:43
Re: php中如何设置路径
Ubuntu下如果更改了配置文件时要重新启动Apache的
$ sudo gedit /etc/apache2/apache2.conf
把 ServerRoot更改为你的路径, 如 /home/htdocs, 保存,
然后, 重新加载配置文件, 重启Apache:
$ sudo /etc/init.d/apache2 reload
$ sudo /etc/init.d/apache2 restart
$ sudo gedit /etc/apache2/apache2.conf
把 ServerRoot更改为你的路径, 如 /home/htdocs, 保存,
然后, 重新加载配置文件, 重启Apache:
$ sudo /etc/init.d/apache2 reload
$ sudo /etc/init.d/apache2 restart
-
- 帖子: 448
- 注册时间: 2008-07-10 15:08
Re: php中如何设置路径
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
-
- 帖子: 448
- 注册时间: 2008-07-10 15:08
Re: php中如何设置路径
修改了不管事
-
- 帖子: 448
- 注册时间: 2008-07-10 15:08
Re: php中如何设置路径
我上面的设置是哪出错了,萨来了127.0.1.1