Created
June 1, 2017 13:07
-
-
Save Veve2/d74249269a9d03d9cf590ae4256daa00 to your computer and use it in GitHub Desktop.
Real __FILE__
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$stack = debug_backtrace(); | |
$firstFrame = $stack[count($stack) - 1]; | |
$initialFile = $firstFrame['file']; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://stackoverflow.com/a/4645110/4074148