What's Here?
- Members: 95,549
- Replies: 379,885
- Topics: 56,749
- Snippets: 1,916
- Tutorials: 494
- Total Online: 928
- Members: 44
- Guests: 884
Who's Online?
|
get full url of the page.
|
Submitted By:
|
|
Rating:
|
|
Views: 23,570 |
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
|
|
|
Reference Sheets
Bye Bye Ads
Free DIC T-Shirt
Related Sites
Monthly Drawing
Partners
Top Contributors
Top 10 Kudos This Month
|