访问控制器的视图操作时出现错误,这可能是因为命名约定。我的控制器文件名是场所_controller.php,我的模型文件名是场所.php。数据库表名是场所。场地列表页面 URL 是domain.com/venues/,场地详细信息页面是domain.com/venue/id-slug这些都按预期工作,当我访问domain.com/venues/id-slug时出现问题,请给我解决方案,我是 Cakephp 的新手。
我有这些错误:
#0 /home/public_html/demo/app/controllers/venues_controller.php(25): AppController->beforeFilter()
#1 /home/public_html/demo/core/cake/libs/controller/controller.php(538): VenuesController->beforeFilter()
#2 /home/public_html/demo/core/cake/libs/dispatcher.php(175): Controller->startupProcess()
#3 /home/public_html/demo/core/cake/libs/dispatcher.php(138): Dispatcher->_invoke(Object(VenuesController), Object(CakeRequest))
#4 /home/public_html/demo/app/webroot/index.php(114): Dispatcher->dispatch(Object(CakeRequest))