|
Posted by jussist@gmail.com on 05/29/07 07:37
> Ummm...reading the manual?
>
> http://uk.php.net/include/
>
> "When a file is included, parsing drops out of PHP mode and into HTML
> mode at the beginning of the target file, and resumes again at the end.
> For this reason, any code inside the target file which should be
> executed as PHP code must be enclosed within valid PHP start and end
> tags."
Interesting topic this has been, and at last there is the correct
answer. I can easily imagine a situation where and included file,
whether being html, plain text or php, would be sometimes run
separately, sometimes as included file. If including would require
the ?> -tags or <?php -tags, the whole include -functionality would
become unusable. This kind of behavior could of course be done with a
parameter that would determine whether those tags would be needed or
not, but that's another story then.
On the other issue about <?php -tags. In no way <?php is an html -tag.
It is not one, period. <% is not html tag, <cfoutput is not an html -
tag, <?= is not an html tag. Neither is any other markup that is used
in some own server side software to identify interpreted parts of the
code. Html -tags are listed in: http://www.w3.org/TR/html401/index/elements.html
..
--
Jussi T
http://view.fi
http://naamio.net
http://hoffburger.com
Navigation:
[Reply to this message]
|