Trevor wrote:
How can I get the URI for a page? For example, I want $domain =
"http://www.domain.com" in the page http://www.domain.com/page.php.
That will depend on a bunch of different things, mostly to do with your
server setup...
Here's something to get you started (in apache):
$urI = $_SERVER['REQUEST_URI']; // includes query string...
$proto=substr($_SERVER['SERVER_PROTOCOL'],0,strpos('/',$_SERVER['SERVER_PROTOCOL']));
$port=$_SERVER['SERVER_PORT'];
$host=$_SERVER['HTTP_HOST'];
$urL = strtolower($proto).'://'.$host.':'.$port.$urI;
When in doubt, check the output of phpinfo()
--
Justin Koivisto, ZCE -
ju****@koivi.com http://koivi.com