We Recommend

Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text.


Posted By

Abe on 01/15/08


Tagged

file name current


Versions (?)


Current file name


Published in: PHP 


  1. <?php
  2. $break = Explode('/', $_SERVER["SCRIPT_NAME"]);
  3. $self_file = $break[count($break) - 1];
  4. ?>

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: dhayes on January 20, 2008

or .. $file = end(explode('/',FILE));

You need to login to post a comment.