I use a Page class to construct all the pages on my website, and one of the properties of Page is the path to the root of the website. I use regular expressions to check for the depth of the page, then convert that into "../../", etc. so I can include any file on any page, regardless if the page changes directories. Ie:
class Page extend Gen
{
// .....
include($this->root."includes/example.php");
//.....
}
|
This is great in all live pages and when running the page under Apache locally, but when running it on the SRV webserver, it always appends the "localhost:8081" with a "/file:/C:/..." for full path to the file being run.
Is there anyway to set up the SRV webserver to either use the currently activated projects root directory as its root directory, so it would use an address like "localhost:8081/example/example.php". Or is there a way to have it use subdomains for each project, similar to how I have Apache set up?
Any help/suggestions/ideas are appreciated.