亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

Warning: require_once(/libs/Controller/indexController.class.php): failed to open stream: No such file or directory in D:\AppServ\www\mvc\function.php on line 3 Fatal error: require_once(): Failed opening required '/libs/Controller/indexController.class.p

?function C($name, $method){
??require_once('/libs/controller/'.$name.'Controller.class.php');
??eval('$obj = new '.$name.'Controller();$obj->'.$method.'();');
?}

正在回答

5 回答

老師在后面是加了這個的?controller=test&method=show,也就是完整的網址是http://localhost:8080/mvc/admin.php?controller=admin&method=test,傳了一個控制器名admin和test方法的

0 回復 有任何疑惑可以回復我~

require_once('./libs/Model/'.$name.'Model.class.php');

視頻里的php版本可能比較老,我用php7.0的版本路徑要加點

0 回復 有任何疑惑可以回復我~

咱倆的問題一模一樣,你的問題解決了嗎?能否指點一下

0 回復 有任何疑惑可以回復我~

輸入網址為http://localhost/MVC/index.php?controller=test&method=show;而你輸的是http://localhost/MVC/index.php?!你忘記傳參了,這個問題困擾了我一天

0 回復 有任何疑惑可以回復我~

找不到這個文件/libs/Controller/indexController.class.php,看路徑是否正確


0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

Warning: require_once(/libs/Controller/indexController.class.php): failed to open stream: No such file or directory in D:\AppServ\www\mvc\function.php on line 3 Fatal error: require_once(): Failed opening required '/libs/Controller/indexController.class.p

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號