View Single Post

  #1 (permalink)  
Old 08-28-2003
Jeffrey Pearson
 
Posts: n/a
Default Parsing Current Server Domain

Does anyone know how I would parse the domain that scripts are currently being executed in?

For example:

I use seperate domains for development and production. There are times I have to specify a hard coded url instead of a relative one. So for the development it would be;

dev.domain.com/somefile.php

where on the live site it would be

www.domain.com/somefile.php

I would like the script to be able to parse the domain part so it would be;

$currentdomain/somefile.php


AAny suggestions would be greatly appreciated.

Jeff Pearson
Reply With Quote