Thinkphp遇到这样的错
:(
ThinkModel:search方法不存在!
错误位置
FILE: E:wwwqazxThinkPHPLibraryThinkModel.class.php LINE: 226
TRACE
#0 E:wwwqazxThinkPHPLibraryThinkModel.class.php(226): E('Think\Model:sea...')
#1 E:wwwqazxAdminHomeControllerGoodsController.class.php(31): ThinkModel->__call('search', Array)
#2 [internal function]: HomeControllerGoodsController->list()
#3 E:wwwqazxThinkPHPLibraryThinkApp.class.php(143): ReflectionMethod->invoke(Object(HomeControllerGoodsController))
#4 E:wwwqazxThinkPHPLibraryThinkApp.class.php(181): ThinkApp::exec()
#5 E:wwwqazxThinkPHPLibraryThinkThink.class.php(117): ThinkApp::run()
#6 E:wwwqazxThinkPHPThinkPHP.php(94): ThinkThink::start()
#7 E:wwwqazxAdminindex.php(6): include('E:\www\qazx\Thi...')
#8 {main}
ThinkPHP3.2.1 { Fast & Simple OOP PHP Framework } -- [ WE CAN DO IT JUST THINK ]
解决
发现引入模板名称打错
namespace AdminModel;
use ThinkModel;
改为
namespace HomeModel;
use ThinkModel;
即可