Re: note 11975 added to control-structures.php
| From: | Jesus M. Castagnetto | Date: | Fri, 16 Mar 2001 03:00:51 +0000 |
| Subject: | Re: note 11975 added to control-structures.php | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-12456@lists.php.net to get a copy of this message | ||
This is clearly discussed in the manual: "Appendix B.
Migrating from PHP 3.0 to PHP 4.0".
Reading that appendix would've helped a lot.
Will add the comment above to your note. If you rather
have your note removed, let know ASAP.
--- czyz@serv.noSPAM.net wrote:
> It would appear that PHP4 does not allow a control
> structure to open in one included file and close in
> another. Perhaps it was a terrible idea, but I had a
> set of pages that included "include/start-page.php3"
> at the beginning of the page and
> "include/end-page.php3" at the end. Among other
> things, start-page.php3 basically had the following
> code at the end of the file:<p>
> if (the user isn't logged in) {
> display_login_form();
> } else {
> ?><p>
> and the end-page.php3 file began with the right
> curly bracket that would end that block of logic.
> This way, I could create a bunch of pages that
> looked like this:<p>
> include "include/start-page.php3";
> include "all-the-content.php3";
> include "include/end-page.php3";<p>
> and if the user was not logged in, they'd see only a
> login form and no other content. This worked just
> fine until I upgraded to php4, which produces parse
> errors when the logic block in an included file
> doesn't conclude before EOF. Looks like maybe I'll
> have to set a variable and test for it all over the
> place.
>
> http://www.php.net/manual/en/control-structures.php
>
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-notes-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-notes-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
--- Jesus M. Castagnetto <jmcastagnetto@php.net>
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/