Re: [Q] use of 'use' available?
| From: | chagenbu at wso dot williams dot edu | Date: | Thu, 01 Jun 2000 02:47:04 +0000 |
| Subject: | Re: [Q] use of 'use' available? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-766@lists.php.net to get a copy of this message | ||
Quoting Ken Minx <ken.minx@consultsource.com>:
> You could set a unique variable in 'mylib.php', for instance, then have each
> page check for the variable and/or contents. If it isn't present, require or
> include.
I'm well aware of that, and it's something I've done before. But it's an ugly
solution, and there's no guarantee that your "unique" variable won't clash with
something that someone is using - _especially_ in the case where you're
distributing a library meant to be used in other code. A clean way to include
code only once is well within the scope of the language, IMHO.
-chuck