1# C:\Users\Redacted\Desktop\main.php
2include __DIR__ . DIRECTORY_SEPARATOR . 'include.php';
3echoScriptPath();
4
5# C:\Users\Redacted\Desktop\include.php
6function echoScriptPath() {
7 list($scriptPath) = get_included_files();
8 echo 'The script being executed is ' . $scriptPath;
9}