Re: website tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Get the various parts from the $_SERVER superglobal variable:
1) scheme (e.g. http://) from $_SERVER['HTTPS'] (https if "on")
2) host:port (e.g. bucksvsbytes.com) from $_SERVER['HTTP_HOST']
3) /path/page?query part (e.g. /catalog/index.php?pid=444) from $_SERVER['REQUEST_URI']

John Gunther
Alain Roger wrote:
Hi,

let's imaging we have the following thing :

www.mywebsite.com/company/index.php
www.mywebsite.com/company/profile.php
www.mywebsite.com/services/index.php

how can i detect in which address am i ?

for example how to retrieve www.mywebsite.com/services or
www.mywebsite.com/company


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux