Page 1 of 1

Included file information

Posted: Sun Jan 09, 2005 9:51 am
by Shendemiar
Is it possible (and how), to reveal the actual file the is executing.

Code: Select all

<?php
If(isset($_GET['debug']))
  if($_GET['debug']=="file")
    {
    $location = The actual included file that has the script currently executing;
    echo"<div style="background:#FAA; border:something....;">$location</div>";
    }
?>

Posted: Mon Jan 10, 2005 7:51 pm
by rehfeld
echo __FILE__;


its a "magic constant"

http://www.php.net/manual/en/language.c ... efined.php