Posted By

xtheonex on 01/27/09


Tagged

php


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

umang_nine
NyX


Current page name


 / Published in: PHP
 

Function to return the current page name, without the location of it... Eg, for the URL http://localhost/www/someproject/index.php, this would return index.php

  1. function curPageName() {
  2. return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
  3. }

Report this snippet  

You need to login to post a comment.