faqts : Computers : Programming : Languages : PHP : Function Libraries : URL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

109 of 134 people (81%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How can I get the current URL (PHP_SELF only gives the script filename)?

May 29th, 2001 04:19
Priit Potter, tursiops truncatus, http://www.php.net/manual/en/language.variables.predefined.php


$url = $HTTP_SERVER_VARS["HTTP_HOST"] . $HTTP_SERVER_VARS["REQUEST_URI"]

for a list of predefined variables create a PHP-file with only

<? phpinfo() ?>

and execute it.