1. In my [B]php.ini
[INDENT]doc_root = “Z:/WebRroot”
include_path = “.;Z:WebRoot;Z:WebRootPHPClasses”[/INDENT]
2.
In the [B]Z:WebRoot[B]WebSiteLocator.php
In the file [B]SysInfo.php[B]Z:NiK
[code=php]require_once(‘WebSiteLocator.php’);
In [B]httpd.conf
[FONT=”Courier New”][INDENT]Alias /nik “Z:/NiK”[/INDENT][/FONT]
as this directory contains PHP and HTML files and is outside the PHP and Apache doc roots
4. When I run a PHP script ([B]afile.php[B]Z:NiK[B]SysInfo.php[url]http://localhost/nik/afile.php
[INDENT][B]Warning[B]Z:NiKSysInfo.php
[B]Fatal error[B]Z:NiKSysInfo.php
[/INDENT]
Note that [B]Z:NiK
5. I modified the script in item 3 to be:
[code=php]
echo “realpath ==> “.realpath(‘/’);
require_once(‘WebSiteLocator.php’)
and before the error message, I get
[INDENT]
realpath ==> Z:
[/INDENT]
Why is it not the following??
[INDENT] realpath ==> Z:WebRoot[/INDENT]