Try $_SERVER['SCRIPT_FILENAME']

respectively

<?php echo "{$_SERVER['SCRIPT_FILENAME']}"; ?>