Thursday, March 3, 2011

Get the Current Page URL

Insert this code in your php file.

<?php
$path = substr($_SERVER["SCRIPT_NAME"], strrpos($_SERVER["SCRIPT_NAME"], "/") +1);
echo $path;
?>

And now preview in your browser it'll show you which page open in your browser

No comments:

Post a Comment