note 75265 deleted from language.basic-syntax by tularis
| From: | tularis@php.net | Date: | Mon, 21 May 2007 14:20:09 +0000 |
| Subject: | note 75265 deleted from language.basic-syntax by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-126797@lists.php.net to get a copy of this message | ||
Note Submitter: Geekman at Textbook Torrents dot com
----
Per Geoffrey Thubron's comments, every include must in itself be a valid PHP file; you cannot
begin a control block in one file and end it in another. Think of the structure as a tree; all your
broadest code must be handled in the page to which the user navigates, which can then branch to
multiple includes as necessary, which can themselves branch.
As a side note, your <p>some conditional content</p> and such will not be output - they
will generate parse errors themselves. You would need to use echo, print or the <?
?><p>some additional content</p><? ?> method described in this article in order
to achieve your intended result.