workerman接口安全

lichao
$class      =   $message_data;//类
$method     =   $message_data;//方法
$args       =   $message_data;//参数

if(file_exists(__DIR__.'/Controller/'.$class.'.class.php'))
{
      require_once __DIR__.'/Controller/'.$class.'.class.php';
      $exec=$class.'::'.$method;
      call_user_func_array($exec, array($args));
}else
{
      return ;
}

问题:怎么保证接口的安全性?使用token验证呢还是,有其他方法?

4733 1 0
1个回答

walkor

token 也行,ip鉴权也行,其它方法都可以,看项目需要

  • 暂无评论
年代过于久远,无法发表回答
🔝