import('ORG.Util.Auth');//加载类库
$auth=new Auth();
if(!$auth->check('rule001',session('uid'))){
$this->error('你没有权限');
}
//这样 使用规则001 验证成功
验证节点尝试使用教程中的方法:
if(!$auth->check(MODULE_NAME.'-'.ACTION_NAME,session('uid'))){
$this->error('你没有权限');
}尝试后发现:// 这段代码通不过。
$command = preg_replace('/\{(\w*?)\}/', '$user[\'\\1\']', $r['condition']);
@(eval('$condition=(' . $command . ');'));求大神提点一二!!!! 最佳答案