We have an internal website that runs a php application. I am adding a new feature in a subdirectory that I want to expose to the internet. My thought was that I would make a website that runs under a different port, like 84, then port forward from the router. I am running IIS 6 on SBS 2003. So I created a new website and pointed it to the subdirectory of the other site, but when I pull it up it acts like it's loading the index file of the root site, not the subdirectory. In the code, I'm loading a config file based on the document_root, but that fails because it's looking in the subdirectory for the config file. Here's the structure so hopefully this will make more sense:
Root web site
--index.php
\config\config.php
\commercial\index.php
Commercial website (same path on disk as commercial subdirectory of other site)
index.php
The code is:
require($_SERVER["DOCUMENT_ROOT"] . "/config/config.php");
When I load the page I get this:
Fatal error: require() [function.require]: Failed opening required 'C:\Inetpub\tracker\commercial/config/config.php' (include_path='.;c:\php\includes') in c:\Inetpub\tracker\index.php on line 3
Now I could change the code so it loads the right path instead of the document root, but it's not loading commercial/index.php, it's loading the root index.php. So what's up with that? Is there another, better way to do this??? Thanks for any help.