
当我将$this-> 删除 打印的时候有数据,但是加上$this 却报错? 这是上面原因呢,异常我自定的
附上代码:
<?php
namespace app\api\controller;
use think\Controller;
use app\common\lib\ApiException;
use app\common\lib\Psalt;
class Common extends Controller
{
protected $header='';
public function _initialize(){
$this->checkRequestAuth();
}
public function checkRequestAuth(){
$this->$header = request()->header();
halt($this->$header);
}
// 解密
public function testAes(){
$psalt = new Psalt();
echo $psalt::setSign($this->$header);
}
}
QQ截图20180518142014.jpg
( 58.98 KB 下载:0 次 )
最佳答案