Get the Current Page Name

by raveendran 2010-01-28 15:03:00

Get the current page name of URL that is shown in the browser URL window.
<?php
function curPageName() {
return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
}
echo "The current page Name is ".curPageName();
?>

Tagged in:

1008
like
0
dislike
0
mail
flag

You must LOGIN to add comments