Código:
pero cuando voy a ver en el navegador me sale <?php class AuthenticationController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ } public function indexAction() { } public function loginAction() { $authAdapter= $this->getAuthAdapter(); $username='rob'; $password='rob'; $authAdapter->setIdentity($username) ->setCredential($password); $auth=Zend_Auth::getInstance(); $result=$auth->authenticate($authAdapter); if($result->isValid()){ echo 'valid'; }else{ echo 'invalid'; } } public function logoutAction() { echo "hola"; } private function getAuthAdapter(){ $authAdapter= new Zend_Auth_Adapter_DbTable(Zend_Db_Table::getDefaultAdapter()); $authAdapter->setTableName('users') ->setIdentityColumn('username') ->setCredentialColumn('password'); return $authAdapter; } }
An error occurred
Application error
no me dice nada que puedo tener mal.
saludos