include/require inside of function
| From: | Aric Caley | Date: | Fri, 04 Jul 2003 07:11:18 +0000 |
| Subject: | include/require inside of function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-153962@lists.php.net to get a copy of this message | ||
Is there anyway to include a file inside of a function and have the included
stuff be global? For instance if I defined a class or a function in that
include file, I want to be able to use that class outside of the function.
On the documentation for include() a poster commented that it did indeed
work like this, but my testing indicates it does not. Everything stays
local to the function and goes away when the function ends.
Is there a way?