note 62777 added to function.include
| From: | emailforphpnet at katamari dot com dot br | Date: | Thu, 09 Mar 2006 13:04:58 +0000 |
| Subject: | note 62777 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-105133@lists.php.net to get a copy of this message | ||
About the note
$pathFix = dirname(__FILE__);
include("$pathFix/../somedir3/C.php"); //Works all the time...
This will not work if the $pathFix is something like
/a/very/big/sequence/of/dirs/
so, it´s easy to know where the includes are and use
$_SERVER['DOCUMENT_ROOT'].'/somedir3/C.php'
----
Server IP: 66.163.161.117
Probable Submitter: 201.6.118.80
----
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.include.php
Edit -- http://master.php.net/note/edit/62777
Del: integrated -- http://master.php.net/note/delete/62777/integrated
Del: useless -- http://master.php.net/note/delete/62777/useless
Del: bad code -- http://master.php.net/note/delete/62777/bad+code
Del: spam -- http://master.php.net/note/delete/62777/spam
Del: non-english -- http://master.php.net/note/delete/62777/non-english
Del: in docs -- http://master.php.net/note/delete/62777/in+docs
Del: other reasons-- http://master.php.net/note/delete/62777
Reject -- http://master.php.net/note/reject/62777
Search -- http://master.php.net/manage/user-notes.php