🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
##### GET方式传递 ~~~ $other = []; $get = []; $get['键'] = "值"; $other['get'] = $get; $back = $H_A->interaction('http://localhost',$other); ~~~ > 接收方式 : $_GET[键]=值 ##### POST方式传递 ~~~ $other = []; $post = []; $post['键'] = "值"; $other['post'] = $post; $back = $H_A->interaction('http://localhost',$other); ~~~ > 接收方式 : $_POST[键]=值 ~~~ $other = []; $other['post'] = $json; $back = $H_A->interaction('http://localhost',$other); ~~~ > 接收方式 : $GLOBALS['HTTP_RAW_POST_DATA'] ##### HEAD 方式传递 ~~~ $other = []; $head = []; $head['键'] = "值"; $other['head'] = $head; $back = $H_A->interaction('http://localhost',$other); ~~~ > 接收方式 : getallheaders() ##### BODY 方式传递(POST字符串传递方式) ~~~ $other = []; $other['head'] = $json; $back = $H_A->interaction('http://localhost',$other); ~~~ > 接收方式 : file_get_contents("php://input") ##### 定义回调状态 ~~~ $other = []; $other['status'] = 'httpcode'; $other['status'] = 'info'; $other['status'] = 'null'; $back = $H_A->interaction('http://localhost,$other'); ~~~ >status: httpcode(只返回状态值) | info(只返回响应内容) | null(前两种以数组形式返回) ##### 隐藏回调(不返回任何回调信息) ~~~ $other = []; $other['hide'] = '1'; $back = $H_A->interaction('http://localhost,$other); ~~~ ##### 定义超时 ~~~ $other = []; $other['timeout'] = '10'; //定义超时秒数 $other['timeout_ms'] = '1000'; //定义超时毫秒数 $back = $H_A->interaction('http://localhost,$other); ~~~ ##### 开启对等证书验证 ~~~ $other = []; $other['pem'] = '1'; //对等证书验证(1启用0禁用) $back = $H_A->interaction('http://localhost,$other); ~~~