關于require_once的問題
1、假如a頁面帶有require_once "include.php";
2、a頁面運行要調用b和c的函數,并且c頁面也要調用b頁面的函數;
3、如果我在c頁面 require_once "include.php"或require_once "b.php"。
4、運行a頁面就會報錯:
Warning:failed to open stream;
Fatal error: require_once(): Failed opening required '../lib/mysql.func.php' (include_path='.;C:\php\pear;E:\wamp\www\360yun\HTML\html\PHP\shop/lib;E:\wamp\www\360yun\HTML\html\PHP\shop/core;E:\wamp\www\360yun\HTML\html\PHP\shop/configs') in E:\wamp\www\360yun\HTML\html\PHP\shop\core\cate.inc.php on line 3
前提:c和b頁面都包含在了include.php。
因為我沒有跟著老師的代碼寫,所以這個問題估計就我遇到了,我懷疑是不是include_path設置的問題導致?
而且我把include和需要調用的頁面都改成require也是沒用的
這是什么問題????
2015-07-01
后來我只能把被include.php已經配置require_once的頁面,把它們互相調用間的require或require_once都去掉,就能運行了