对于下面的代码:PHP未定义的变量
line 10: echo "before require: ".$test;
line 11: require(dirname(__FILE__) . 'load.php');
line 12: echo "after require: ".$test;
输出:
before require:
Notice: Undefined variable: test in /home/test.php on line 12
after require:
如果load.php很简单,也不会有消息:“通知:未定义的变量... “。为什么和“load.php”会如何影响$ test变量?
请显示您的'load.php'源代码。 – pltvs 2011-06-08 07:19:29