Jump to content

detecting current file name


dooper3

Recommended Posts

yup!

full url:
[code]
<?
function get_url(){
if(!empty($_SERVER[QUERY_STRING])) return 'http://'.$_SERVER[SERVER_NAME].$_SERVER[PHP_SELF].'?'.$_SERVER[QUERY_STRING];
else return 'http://'.$_SERVER[SERVER_NAME].$_SERVER[PHP_SELF];
}
echo get_url();
?>
[/code]

just page:
[code]
<?
echo $_SERVER['PHP_SELF'];
?>
[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.