Fatal error: Class 'M' not found
Fatal error: Class 'M' not found in?C:\xampp\htdocs\mvc\libs\Controller\testController.class.php?on line?4
?class testController{
? ? ?public function show(){
? ? ? ? $testModel= new M('test');?
? ? ? ? $data=$testModel->get();
? ? ? ? $testView= new V('test');
? ? ? ? $testView->display($data);
? ? ?}
?}
2016-11-12
問題找到了 原因是大M方法已經在function文件中被實例化 所以直接調用大M方法就可以了 不用new
public function show(){
? ? ? ?// $testModel= ?new M('test');
? ? ? ? $testModel= ?M('test');
? ? ? ? $data=$testModel->get();
? ? ? ? $testView= new V('test');
? ? ? ? $testView->display($data);
? ? ?}
2016-11-07
我也出現了這個問題,前面說的那個方法解決不了 ??
2016-11-04
老師演示的時候也沒有說要已經納入function.php文件啊
2016-11-04
老師演示的時候也沒有說要已經納入function.php文件啊
2016-11-04
我的也是這個問題
2016-11-04
致命錯誤:類 M 沒有被發現。
可能是你的function文件沒有被引用
2016-11-04
testController里面沒有引用function.php文件