Re: return from the middle of a include file
| From: | Peter Bowen | Date: | Wed, 26 Jul 2000 19:37:18 +0000 |
| Subject: | Re: return from the middle of a include file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8386@lists.php.net to get a copy of this message | ||
If you want to only include the file once (and not more than once) use
require_once() or include_once(). Remember require/require_once is
done at compile time, while include/include_once is at run-time
and is significantly slower.
Thanks.
Peter Bowen
>
>
> Hi all,
>
> Have a question. How can I return from the middle of a include file ?
> I have a php script calling package.inc which is 2000 lines. At the
> beginning I check if package.inc has been included before. How can I
> get out of the package.inc (php not pass the rest 2000 lines) ?
>
> Using return ?
>
> Thanks in advance,
>
> HZ
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>