Home

Saturday, September 24, 2011

How to Get the Current Page Name in php

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

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

No comments:

Post a Comment

rathoddhirendra.blogspot.com-Google pagerank and Worth