[Php-it] Terminare un include è possibile?

Davide Michel 'ZioBudda' Morelli michel at ziobudda.net
Thu Feb 1 10:11:50 CET 2007


Gianluca Baù ha scritto:
>
> Come da oggetto, è possibile fare una exit() in in file incluso per 
> terminare SOLO la sua inclusione e non l'esecuzione del chiamante?
> Sarebbe bello.....
>

Handling Returns: It is possible to execute a *return()* 
<http://it.php.net/manual/en/function.return.php> statement inside an 
included file in order to terminate processing in that file and return 
to the script which called it. Also, it's possible to return values from 
included files. You can take the value of the include call as you would 
a normal function. This is not, however, possible when including remote 
files unless the output of the remote file has valid PHP start and end 
tags 
<http://it.php.net/manual/en/language.basic-syntax.php#language.basic-syntax.phpmode> 
(as with any local file). You can declare the needed variables within 
those tags and they will be introduced at whichever point the file was 
included.


-- 
Michel 'ZioBudda' Morelli                       michel at ziobudda.net
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: +39-3939890025 --  Fax: +39-0291390660

http://www.ziobudda.net                         ICQ: 58351764  
http://www.ziobuddalabs.it                      Skype: zio_budda
http://www.ajaxblog.it        			MSN: michel at ziobuddalabs.it                   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ziobudda.net/pipermail/php-it/attachments/20070201/f52c6376/attachment.htm


More information about the Php-it mailing list