changing root
Posted: 04. February 2008 04:59
I have this problem with one of my PHP scripts.
It's suppose to open top.php in the admin directory, but it's failing.
In my PHP code I have this:
I figured that the htdocs folder would be the root. When I view my website with http://localhost/, my website in the htdocs folder does appear. However, with the error above, the system is thinking that the C:\ drive is the root (or so I think). So why won't it let me open top.php?
BTW, I did change my httpd.conf file and it's still not working.
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
- Code: Select all
Warning: require(/admin/top.php) [function.require]: failed to open stream: No such file or directory in C:\xampp\htdocs\admin\scripts\authentication.php on line 2
Fatal error: require() [function.require]: Failed opening required '/admin/top.php' (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\admin\scripts\authentication.php on line 2
It's suppose to open top.php in the admin directory, but it's failing.
In my PHP code I have this:
- Code: Select all
require("/admin/top.php");
I figured that the htdocs folder would be the root. When I view my website with http://localhost/, my website in the htdocs folder does appear. However, with the error above, the system is thinking that the C:\ drive is the root (or so I think). So why won't it let me open top.php?
BTW, I did change my httpd.conf file and it's still not working.
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>