class MyBase extends BaseController
{
public function initialize()
{
parent::initialize(); // TODO: Change the autogenerated stub
if(input('is_intercept') == true){
return $this->redirect('http://www.slong.ink', 302);
}
}
// 重定向
public function redirect(...$arg) {
throw new \think\exception\HttpResponseException(redirect(...$arg));
}
}
最后修改:2022 年 01 月 03 日 10 : 08 AM
© 允许规范转载