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
問(wèn)題找到了 原因是大M方法已經(jīng)在function文件中被實(shí)例化 所以直接調(diào)用大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
我也出現(xiàn)了這個(gè)問(wèn)題,前面說(shuō)的那個(gè)方法解決不了 ??
2016-11-04
老師演示的時(shí)候也沒(méi)有說(shuō)要已經(jīng)納入function.php文件啊
2016-11-04
老師演示的時(shí)候也沒(méi)有說(shuō)要已經(jīng)納入function.php文件啊
2016-11-04
我的也是這個(gè)問(wèn)題
2016-11-04
致命錯(cuò)誤:類(lèi) M 沒(méi)有被發(fā)現(xiàn)。
可能是你的function文件沒(méi)有被引用
2016-11-04
testController里面沒(méi)有引用function.php文件