I'm looking for a way to get what the current script running. But the thing is I can't use __FILE__ since it gives me the file i'm currently in and in the case of an included file, I want the initial file.
So if I run
index.php and in that file there is an include('test.php')
I want to be able in test.php to get 'index.php' as the current file im runing.
I know I could do __FILE__ in index.php and keep the value in an variable. But i'm looking for a way with minimal change to my files.
Also the script is running in CLI on windows. So trying to parse the the path wont work also.
What are my options?
Thanks to everyone taking the time to read this :)
$_SERVER.$argv[0]because CLI ...