Get current script name without dir


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $file = $_SERVER["SCRIPT_NAME"];
  2. $break = Explode('/', $file);
  3. $pfile = $break[count($break) - 1];
  4. echo $pfile;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.