<?php
require_once 'Zend/Application/Exception.php';
class AuthAdapter implements Zend_Auth_Adapter_Interface
{
protected $name;
protected $pwd;
public function __construct($name,$pwd)
{
$this->name=$name;
$this->pwd=$pwd;
}
public function authenticate()
{
$array;
if (($this->name=='long')&&($this->pwd=='admin'))
{
$array[0]=true;
return new Zend_Auth_Result(1, $array);
}else{
$array[0]=FALSE;
return New Zend_Auth_Result(-1, $array);
}
}
}
?>我的错误代码Warning: require_once(Zend/Application/Exception.php) [function.require-once]: failed to open stream: No such file or directory in F:\wamp\www\zf2\public\landing.php on line 2Fatal error: require_once() [function.require]: Failed opening required 'Zend/Application/Exception.php' (include_path='.;C:\php5\pear') in F:\wamp\www\zf2\public\landing.php on line 2
require_once 'Zend/Application/Exception.php';
class AuthAdapter implements Zend_Auth_Adapter_Interface
{
protected $name;
protected $pwd;
public function __construct($name,$pwd)
{
$this->name=$name;
$this->pwd=$pwd;
}
public function authenticate()
{
$array;
if (($this->name=='long')&&($this->pwd=='admin'))
{
$array[0]=true;
return new Zend_Auth_Result(1, $array);
}else{
$array[0]=FALSE;
return New Zend_Auth_Result(-1, $array);
}
}
}
?>我的错误代码Warning: require_once(Zend/Application/Exception.php) [function.require-once]: failed to open stream: No such file or directory in F:\wamp\www\zf2\public\landing.php on line 2Fatal error: require_once() [function.require]: Failed opening required 'Zend/Application/Exception.php' (include_path='.;C:\php5\pear') in F:\wamp\www\zf2\public\landing.php on line 2
$name= new Zend_Session_Namespace();
$name->sess = "Session 已经存在";
require_once '../library/Zend/Auth/Adapter/Interface.php';
set_include_path(implode(PATH_SEPARATOR, array(
realpath('../library'),
get_include_path(),
)));