Retrieving Page Name

By using the following script you can retrieve a page name.

<?php
function curPageName() {
return substr($_SERVER[“SCRIPT_NAME”],strrpos($_SERVER[“SCRIPT_NAME”],”/”)+1);
}

echo “The current page name is “.curPageName();
?>

Leave a Comment