Re: Include file scope
| From: | O. | Date: | Tue, 25 Jul 2000 17:21:07 +0000 |
| Subject: | Re: Include file scope | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8096@lists.php.net to get a copy of this message | ||
""gfunk007"" <josh@gfunk007.com> wrote in message
news:003201bff651$19575180$cd2965cb@thebeast...
Hi, I have a question. Is there a way to isolate the scope of an
include file, except have some variables pass to it?
if I have a function:
function safe_include($filename,$data) {
include ($filename);
}
will the include be evaluated every time I call safe_function() with a
different $filename???
<Reply>
Yes, it will be evaluated every time you call it w/a different filename.
require() will not. See the section on this in the manual under features
(around chapter 7 or 8, I believe).
--
O.