[Php-it] Terminare un include è possibile?
Gianluca Baù
gianluca at ihuri.it
Thu Feb 1 10:17:03 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.
>
Fantastico, questo cambierà drasticamente il mio modo di lavorare :)
Grazie
ma dove l'hai trovato !?!?
More information about the Php-it
mailing list