note 33418 added to function.require
| From: | php-comment-25-june-2003 at ryandesign dot com | Date: | Wed, 25 Jun 2003 12:16:46 +0000 |
| Subject: | note 33418 added to function.require | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-50986@lists.php.net to get a copy of this message | ||
Contrary to the comment from "Satisfied PHP User" on 20-Jan-2003 at 12:07, and much to my
delight, I find that there is no problem with using (include|require)[_once] inside a function call
(even if that function is inside a class). Although the require call is inside a function, the
functions defined in the included file are available globally, which is exactly what I want.
I'm building a system similar to "Satisfied's" api_load() function (except that
the files I include will contain class definitions, and my "api_load()" function will also
make an instance of that class and call its methods). I am using PHP 4.3.2.
----
Manual Page -- http://www.php.net/manual/en/function.require.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33418
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33418&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33418&report=yes