NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Setup Subdomains on SRV


Joined: 09 Aug 2007
Posts: 24
Reply with quote
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:
Code:

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.
View user's profileFind all posts by tj111Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Quote:
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"

you can use this URL and it's supported by SRV, but will need to enter such URL everytime you need to run the page. Whenever IDE generates the URL it uses file:/full/path/to/the/file and this can't be changed in version 5.2. I'll check if we can change this in the future version. Feel free to submit request on the Feature Request for PhpED forum.

Quote:
Or is there a way to have it use subdomains for each project, similar to how I have Apache set up?

No, it's not supported yet. But it's good idea. Thanks. We'll think about it.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 09 Aug 2007
Posts: 24
Reply with quote
Thanks for the reply, I will make a post in the suggestions forum. I realized that I can run a script in the debugger, then change the url to "localhost:8081/path/to/file.php", and the entered url to be run in debug mode, so that will save me time in having to rewrite the regular expression.
View user's profileFind all posts by tj111Send private message
Setup Subdomains on SRV
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic