Re: Include a B.php but not influence A.php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 19 maj 2016 kl. 03:26 skrev 酷丁 <zsxx51@xxxxxxxxxx>:
> 
> 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...

Hi!

You are including 'b.php', but the file is 'B.php'. Some systems have case sensitive filenames. That means that 'b.php' and 'B.php' are different files. The 'include' function only raises a warning if the files does’t exist. Change the line to "require 'b.php';" and see if you get some errors. Besides that, always check your error logs.

/frank
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux