If you wan`t to compare __FILE__ and $_SERVER['SCRIPT_NAME']
you could use realpath()
it strips out symlinks and things like that
realpath(__FILE__) == realpath($_SERVER['SCRIPT_NAME'])
![]() | get_included_filesDescriptionarray get_included_files ( void )Returns an array of the names of all files that have been included using include(), include_once(), require() or require_once(). The script originally called is considered an "included file," so it will be listed together with the files referenced by include() and family. Files that are included or required multiple times only show up once in the returned array.
See also include(), include_once(), require(), require_once(), and get_required_files(). ![]()
quis -AT- maffiaworld -DOT- n e t
19-Mar-2006 01:08
If you wan`t to compare __FILE__ and $_SERVER['SCRIPT_NAME']
gamblor at crazyhomer dot com
15-Mar-2006 09:08
In regards to
RPaseur at NationalPres dot org
09-Mar-2006 12:04
As is often the case, YMMV. I tried the __FILE__ and SCRIPT_FILENAME comparison and found this:
keystorm :at: gmail dotcom
08-Sep-2004 05:08
As of PHP5, this function seems to return an array with the first index being the script all subsequent scripts are included to.
php at bronosky dot com
03-Jun-2004 08:46
Just FYI, the given example will return this ONLY if executed from the filesystem root: | ![]() |