Re: getting subdirectory

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

 



At 02:29 PM 5/23/2006, Dallas Cahker wrote:

how do I get the subdirectory that a page is being pulled from.

say I have three sites running the same script and I need to determine which
site is which.

http://www.domain.com/subdir1
http://www.domain.com/subdir2
http://www.domain.com/subdir3

and subdir1, subdir2 and subdir3 all need different header and different db
and so on.

how would i get that I am in site subdir3 and not in subdir1?


Check phpinfo(), particularly SCRIPT_FILENAME or REQUEST_URI or SCRIPT_FILENAME in the Apache Environment section, and everything following _SERVER["REQUEST_URI"] in the PHP Variables section.

But why not just put the appropriate header in the subdirectory you are using?

Cheers - Miles



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.392 / Virus Database: 268.7.0/345 - Release Date: 5/22/2006

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