0
我收到錯誤:下面調用未定義方法的ConnectionManager ::的getInstance()CakePHP的ugrade 1.3〜2.0
Error: Call to undefined method ConnectionManager::getInstance() File: /app/Controller/UsersController.php Line: 11
是功能:
function changeDbSource($database = 'default') {
$db = ConnectionManager::getInstance();
$connected = $db->getDataSource($database);
if ($connected->isConnected()) {
return true;
} else {
return false;
}
}
請幫助。
謝謝cornelb。有效 :) –