Re: [SMARTY] Re: I found a BUG in Smarty!
| From: | Norbert Röcher | Date: | Thu, 16 May 2002 17:30:02 +0000 |
| Subject: | Re: [SMARTY] Re: I found a BUG in Smarty! | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4238@lists.php.net to get a copy of this message | ||
"Ivo Jansch" <ivo@ibuildings.nl> schrieb:
>
> Johann wrote:
>
> > But can you show me any working example of posibly errors when you
> > change those 2 lines from include_once() to include()?
>
> Yeah. Put this inside your test.php:
>
> function test()
> {
> }
>
> Your patch will fail with a 'already defined' error message.
>
> It's good programming if you use include_once, and use functions
around
> your code. This is *always* a good idea, not just in this case.
Because
> it saves you the trouble of insecure global variables, and makes
your
> code inherently better reusable.
Perfect answer.
Norbert