$_SERVER['SCRIPT_FILENAME']
The $_SERVER['SCRIPT_FILENAME'] variable gives you the absolute path of the script that is executing.
Use as follows:
echo $_SERVER['SCRIPT_FILENAME'];
Example of possible output:
/home/funsites/public_html/e/1/php/script-filename.php
See also:
|