|
Posted by Geoff Berrow on 05/29/07 00:39
Message-ID: <1180370371.580860.72150@x35g2000prf.googlegroups.com> from
Michael contained the following:
>I guess I'm still missing the point. Once the browser interpreter sees
>the <?php, it assumes that all text to follow is php code until the
>terminating token ?> is seen. Now if the include function is called
>within the <?php ... ?>, the interpreter still assumes that any text
>it sees is PHP. So again, I don't understand why the include text
>needs to bracket its code in <?php ...?>. What am I missing here?
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."
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Navigation:
[Reply to this message]
|