Re: note 24884 added to function.include
| From: | Jesus M. Castagnetto | Date: | Wed, 04 Sep 2002 23:10:37 +0000 |
| Subject: | Re: note 24884 added to function.include | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-36127@lists.php.net to get a copy of this message | ||
See include(). Your note will be removed.
--- dws@mrao.cam.ac.uk wrote:
> I've recently been doing some ASP (yech)
> programming, and found it useful to include files
> with 'open ended' conditional statements. In PHP it
> would be:
>
> main.php:
> <? require ("foo.php"); ?>
> <h1>The condition is true</h1>
> <? require ("bar.php"); ?>
>
> foo.php:
> <?
> if (condition == true) {
> ?>
>
> bar.php:
> <?
> }
> ?>
>
> Unless I'm doing something wrong, this seems to
> cause a parse error in PHP which is a bit of a pain
> if you want to keep the code in main.php to a
> minimum.
>
> Naich.
> --
> http://www.php.net/manual/en/function.include.php
>
http://master.php.net/manage/user-notes.php?action=edit+24884
>
http://master.php.net/manage/user-notes.php?action=delete+24884
>
http://master.php.net/manage/user-notes.php?action=reject+24884
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
--- Jesus M. Castagnetto <jmcastagnetto@php.net>
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com