好日子,我的代码有问题
use \Crypto;
class Server extends Model {
function __construct() {
parent::__construct('server');
}
function SetPass($text) {
$key = \Base::instance()->get('APP_KEY');
$crypt = new \Helper\Crypt($key);
$this->set('root_pass',$crypt->encrypt($text));
return $this;
}
function GetPass() {
$key = \Base::instance()->get('APP_KEY');
$crypt = new \Helper\Crypt($key);
$text = $this->get('root_pass');
return $crypt->decrypt($text);
}
}
任何人都可以帮助我吗?因为代码得到:
PHP警告:具有非复合名称的使用声明'加密'在第3行的/home/trik1725/public_html/3netis/panel/model/server.php中没有效果