Re: PHP and getting part of URL

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

 



Jason ML wrote:
Hi PHP'ers,

PHP 4.4.8 and 5.

say I have a url like:

http://www.mydomain.tld/jason/index.php

In that index.php I want to have a piece of code that runs that tells me the 'jason' part of the URL so that I can run some custom read only queries for 'jason'

How can I do this? I know how to do everything except what PHP commands to run to get the info.

print_r($_SERVER);

to see what you have available.

Then use http://php.net/parse_url on the right variable.

--
Postgresql & php tutorials
http://www.designmagick.com/


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