RE: [PHP] Break, Exit, Die, Kill, Maime and Stab
| From: | Jonathan Pitcher | Date: | Fri, 04 Jul 2003 07:09:00 +0000 |
| Subject: | RE: [PHP] Break, Exit, Die, Kill, Maime and Stab | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-153961@lists.php.net to get a copy of this message | ||
I have added returns to where I had originally added breaks and it works
perfectly. The included code is executed till return is called and then
the included script is no longer executed.
Jonathan
> So...why not write the entire included file as a function and then call
> that function instead of using include? I'd be interested, though, to
> hear if the return broke out of the include.
>
> ------------------------------
> Jeff Moser
> Web Developer
> ihigh Inc. / Host Interactive
> 859.232.8282
>
> ------------------------------
>
>
> -----Original Message-----
> From: Ford, Mike [LSS] [mailto:M.Ford@lmu.ac.uk]
> Sent: Thursday, July 03, 2003 5:10 AM
> To: 'Jim Lucas'; Jonathan Pitcher; php-general@lists.php.net
> Subject: RE: [PHP] Break, Exit, Die, Kill, Maime and Stab
>
>> -----Original Message-----
>> From: Jim Lucas [mailto:phplist@zonedzero.net]
>> Sent: 02 July 2003 22:47
>>
>> Technically you are not outside of a function.
>>
>> you need to use one of the include or require functions to
>> include the file
>> right?
>
> include and require are not functions -- they are language constructs.
>
> (Proof: include 'file.inc'; works.)
>
> Cheers!
>
> Mike
>
> ---------------------------------------------------------------------
> Mike Ford, Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS, LS6 3QS, United Kingdom
> Email: m.ford@lmu.ac.uk
> Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php