Re: website tree

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

 



On Jan 5, 2008 12:06 PM, Alain Roger <raf.news@xxxxxxxxx> 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

<?
preg_match('/\/(.*)\//',$_SERVER['REQUEST_URI'],$match);
echo $match[1];
?>


-- 
Daniel P. Brown
[Phone Numbers Go Here!]
[They're Hidden From View!]

If at first you don't succeed, stick to what you know best so that you
can make enough money to pay someone else to do it for you.

-- 
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