Re: Include a B.php but not influence A.php
| From: | Narcis Garcia | Date: | Thu, 19 May 2016 07:35:15 +0000 |
| Subject: | Re: Include a B.php but not influence A.php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-325603@lists.php.net to get a copy of this message | ||
Move all main code in B.php to a function, and use there the command
"return".
All B.php will run until the "return" call, and A.php will continue
executing.
El 19/05/16 a les 03:26, 酷丁 ha escrit:
> hi,everyone!
>
>
> a problem has troubled me for a long time,I have searched ,but haven't found the answer.
> some thing like this:
>
>
> ---A.php
> <?php
> include 'b.php';
> echo 'test A.php';//because calling exit in b.php,so this can't be execute
> ?>
>
>
> ---B.php
> <?php
> exit("test B.php");
> ?>
>
>
> I want to include b.php(b.php is a third library,but it will exit the script) but no die.I try
> to find some function that can execute b.php and not die a.php ,but I can't.
> are there any other method can do this?
>
>
> thk...
>