0
我嘗試瞭解決這個問題的所有建議解決方案,即清除緩存文件夾。我也禁用了緩存Configure::write('Cache.disable', true);
我的調試級別設置爲2.但是我總是得到一個相同的錯誤。缺少的表只是新添加的表。順便說一句,我只在我的本地主機上運行。 這是我的型號命名Department.phpCakePHP返回丟失的數據庫表
<?php
class Department extends AppModel {
public $name = 'Department';
}
?>
,這是我的控制器名稱DepartmentsController.php
<?php
class DepartmentsController extends AppController {
public $name = 'Departments';
public $helpers = array('Html', 'Form','Session');
public $components = array('RequestHandler','Session');
function index() {
$this->Department->recursive = 0;
$this->set('departments', $this->paginate());
}
}
?>
提前感謝您的回答! :d
cakephp說缺少什麼表?你可以在你的問題中包含實際的錯誤信息嗎?此外,$ name屬性可能不在您的Controller中,只在您的Model中,但我不認爲這與您的問題有關 – thaJeztah 2013-02-26 00:03:37