What's Here?
- Members: 148,840
- Replies: 504,942
- Topics: 79,526
- Snippets: 2,661
- Tutorials: 705
- Total Online: 2,146
- Members: 75
- Guests: 2,071
|
get full url of the page.
|
Submitted By:
|
|
Rating:

|
|
Views: 28,366 |
Language: PHP
|
|
Last Modified: March 16, 2005 |
Instructions: i use for error logging, tells me what page.
use $_SERVER so it logged as superglobal. |
Snippet
<?
$_SERVER['FULL_URL'] = 'http';
if($_SERVER['HTTPS']=='on'){$_SERVER['FULL_URL'] .= 's';}
$_SERVER['FULL_URL'] .= '://';
if($_SERVER['SERVER_PORT']!='80') $_SERVER['FULL_URL'] .= $_SERVER['HTTP_HOST'].':'.$_SERVER['SERVER_PORT'].$_SERVER['SCRIPT_NAME'];
else
$_SERVER['FULL_URL'] .= $_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
if($_SERVER['QUERY_STRING']>' '){$_SERVER['FULL_URL'] .= '?'.$_SERVER['QUERY_STRING'];}
?>
Copy & Paste
|
|
|
Be Social
Reference Sheets
Bye Bye Ads
Monthly Drawing
Top Contributors
Top 10 Kudos This Month
|