note 63166 added to function.get-included-files

From: Date: Wed, 15 Mar 2006 01:08:34 +0000
Subject: note 63166 added to function.get-included-files
Groups: php.notes 
Request: Send a blank email to php-notes+get-105828@lists.php.net to get a copy of this message
In regards to __FILE__ != $_SERVER['SCRIPT_FILENAME'] to check for a file as an include: This only works if you are using PHP as an Apache module; when using PHP as a CGI binary on shared hosts, the filepaths may differ, even if they end up pointing to the exact same file. For example, __FILE__ might be /home/SERVER/USER/SITE/test.php and $_SERVER['SCRIPT_FILENAME'] might be /home/USER/SITE/test.php Because of the SERVER included in the __FILE__ path, the comparison returns true, even though the file is not being included by any other file. ---- Server IP: 64.71.164.2 Probable Submitter: 69.175.58.177 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.get-included-files.php Edit -- http://master.php.net/note/edit/63166 Del: integrated -- http://master.php.net/note/delete/63166/integrated Del: useless -- http://master.php.net/note/delete/63166/useless Del: bad code -- http://master.php.net/note/delete/63166/bad+code Del: spam -- http://master.php.net/note/delete/63166/spam Del: non-english -- http://master.php.net/note/delete/63166/non-english Del: in docs -- http://master.php.net/note/delete/63166/in+docs Del: other reasons-- http://master.php.net/note/delete/63166 Reject -- http://master.php.net/note/reject/63166 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#105828) next »