我是Zend Framwork中的新成员。我下面写的登录一个动作给出:Zend登录问题
public function authAction()
{
$request = $this->getRequest();
$registry = Zend_Registry::getInstance();
$auth = Zend_Auth::getInstance();
$DB = $registry['rdvs'];
$authAdapter = new Zend_Auth_Adapter_DbTable($DB);
$authAdapter->setTableName('user')
->setIdentityColumn('user_name')
->setCredentialColumn('password');
// Set the input credential values
$uname = $request->getParam('username');
$paswd = $request->getParam('pwd');
$authAdapter->setIdentity($uname);
$authAdapter->setCredential(md5($paswd));
// Perform the authentication query, saving the result
$result = $auth->authenticate($authAdapter);
if($result->isValid()){
//print_r($result);
$data = $authAdapter->getResultRowObject(null,'password');
$auth->getStorage()->write($data);
$this->_redirect('/service/');
}else{
$this->_redirect('/index/');
}
}
当我朗姆酒我的web应用程序,然后其给定的异常: 消息:目前没有数据库适配器 我不明白的地方我difine数据库或phpmyadmin连接。
先生,我没有在我的application.ini文件中配置任何东西,请告诉我如何配置我的application.ini文件。我能做些什么改变? –
打开你的application.ini –