What's Here?
- Members: 244,058
- Replies: 692,828
- Topics: 113,099
- Snippets: 3,863
- Tutorials: 935
- Total Online: 1,389
- Members: 91
- Guests: 1,298
|
get full url of the page.
|
Submitted By:
|
|
Rating:

|
|
Views: 33,059 |
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
|