Saturday, October 15, 2011

Get current file name - PHP

$currentPath = $_SERVER['PHP_SELF'];
$parts = explode('/', $currentPath);
$pagename = $parts[count($parts) - 1];

No comments:

Post a Comment