Posted By

eldanieldeepak on 09/25/11


Tagged

php page name current


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

gregizett
tux-world


Get current page name in php


 / Published in: PHP
 

URL: http://www.scriptygoddess.com/archives/2007/07/13/use-php-to-get-the-current-pagefile-name/

  1. <?php
  2. $currentFile = $_SERVER["PHP_SELF"];
  3. $parts = Explode('/', $currentFile);
  4. echo $parts[count($parts) - 1];
  5. ?>

Report this snippet  

You need to login to post a comment.