Virtual Hosts document root directory.
| From: | Richard Quadling | Date: | Wed, 23 May 2001 16:07:55 +0000 |
| Subject: | Virtual Hosts document root directory. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-54094@lists.php.net to get a copy of this message | ||
Hi.
I am using Sambar Server on Win98SE, PHP 4.0.5. All is well.
The server supports "virtual hosts". I am not sure of the terminology
outside of Sambar, but effectively, I can go to my browser and enter ...
local.site1.com
local.site2.com
etc.
And get different sites.
I have a set of PHP scripts which are copied to each of the sites
public_html directory.
They are all on the same IP address (as I only have 1 pc).
The server's documents are served out via localhost.
I want to know the document (or public_html) directory of the site that
called the PHP script.
The reason is that the script needs to see if certain files exist so that
the resultant HTML shows the correct info. Some of them are in both sites,
some files are only in 1 or 2 sites, but they always have the same name.
I assume there is a variable somewhere?
Ideas/suggestions please.
Thanks in advance.
Richard Quadling.