note 70443 added to function.include-once
| From: | tszming at gmail dot com | Date: | Tue, 17 Oct 2006 02:35:40 +0000 |
| Subject: | note 70443 added to function.include-once | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-118595@lists.php.net to get a copy of this message | ||
a simple & optimized way to include once
function my_include_once($path) {
if ( !defined($path) ) {
include($path);
defined($path, 1);
}
}
// sample
my_include_once("/home/www/class/object.php");
----
Server IP: 202.181.244.117
Probable Submitter: 125.215.205.194
----
Manual Page -- http://www.php.net/manual/en/function.include-once.php
Edit -- https://master.php.net/note/edit/70443
Del: integrated -- https://master.php.net/note/delete/70443/integrated
Del: useless -- https://master.php.net/note/delete/70443/useless
Del: bad code -- https://master.php.net/note/delete/70443/bad+code
Del: spam -- https://master.php.net/note/delete/70443/spam
Del: non-english -- https://master.php.net/note/delete/70443/non-english
Del: in docs -- https://master.php.net/note/delete/70443/in+docs
Del: other reasons-- https://master.php.net/note/delete/70443
Reject -- https://master.php.net/note/reject/70443
Search -- https://master.php.net/manage/user-notes.php