Return from include file

前端 未结 5 1063
醉酒成梦
醉酒成梦 2020-11-27 17:41

in PHP, how would one return from an included script back to the script where it had been included from?

IE:

1 - main script 2 - application 3 - included

5条回答
  •  我在风中等你
    2020-11-27 17:52

    See Example #5 in the documentation for include.

    You can get the return value of the script when including it, like:

    $foo = include 'script.php';
    

提交回复
热议问题