Re: [PHP] Include a B.php but not influence A.php
- Date: Thu, 19 May 2016 11:16:20 +0530
- From: Jigar Dhulla <jigar.tidus@xxxxxxxxx>
- Subject: Re: [PHP] Include a B.php but not influence A.php
On Thu, May 19, 2016 at 6:56 AM, 酷丁 <zsxx51@xxxxxxxxxx> wrote:
> a problem has troubled me for a long time,I have searched ,but haven't
> found the answer.
> some thing like this:
> include 'b.php';
> echo 'test A.php';//because calling exit in b.php,so this can't be execute
> 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?
Libraries generally never die, they only have classes to include in
project. According to me, it must be a full-fledged application/script, so
what I can suggest is that you run the script externally. Means, if your
app is located at http://<your-domain>.com then that script can be
After setting up like this you can make curl or ajax request to 3rd party
script URL to fetch the output.
I personally do it that way. Hope this helps.