note 62327 added to function.require
| From: | webmaster at netgeekz dot net | Date: | Sat, 25 Feb 2006 05:34:10 +0000 |
| Subject: | note 62327 added to function.require | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-104402@lists.php.net to get a copy of this message | ||
I have learnt to manipulate this code into an effecitve and easy to use form. I use it with
require_once, but it could be used for require.
require_once($_SERVER['DOCUMENT_ROOT'].'/includes/top.php');
This mainly jumps back to the servers document root and then begins to enter the directories defined
until it finds the file. In this case it would go back to the root of the server, or whatever your
document root is, and then enter includes. there it would search for the top.php file. Simple to
use, yet effective...espcially for people like me who re-use code or move files to different
directories. I don't have to fix the includes, because they all work the same way.
----
Server IP: 216.194.113.175
Probable Submitter: 70.143.34.85
----
Manual Page -- http://www.php.net/manual/en/function.require.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+62327
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+62327&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+62327&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+62327&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+62327&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+62327&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+62327&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+62327&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+62327&report=yes
Search -- http://master.php.net/manage/user-notes.php