I'm not sure about others, but I am glad this behavior is like this.

It is very nice for modules to "stand on their own" so to speak, so that 
you don't have to worry about what context they are used in. If the file 
you are including is plain HTML, would you want it to be parsed as if it 
were PHP? No, but if you had to include PHP in it (the closing ?> for 
example), it wouldn't be a plain HTML file anymore. You might have other 
applications in different languages using the same module that would now 
have to interpret PHP.

On the other hand, what about a PHP script that you want to include. 
Wouldn't it be annoying to get a parse error when you include it because 
of the double opening tags?

Those are just a few thoughts.

Happy hacking.

Chris

Michael Eales wrote:

>This did indeed fix the problem, thanks for the advise.
>
>A question though:
>Why is this necessary, the include/require is called from index.php while in
>"PHP mode" ?
>The functions work fine as if I remain in "PHP mode" within the functions.
>It is only when I go in and out of "HTML mode" within the function that this
>problem arises.
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to