账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    PHP调用webservice接口
    36
    0

    公司有个同事在用PHP调用webservice接口,但是一直提示失败,数据无法交互,我本身不懂PHP的,我见他可能忙不过来,帮他上来提问一哈,先谢谢各位大佬帮忙解答

    $usertoken='****';
    $url='http://********';
    $arr_data=array('shopNo'=>2,'date'=>date('Y-m-d'),'data'=>array('spNum'=>'***==','isBuy'=>0,'price'=>"1.00"));
    $json_data=json_encode($arr_data);
    //$str_url=$url."?usertoken=".$usertoken."&data=".$json_data;
    //echo $str_url;exit;
    $data=array("usertoken"=>$usertoken,"data"=>'2134564');
    $client = new SoapClient($url,array('track' => 1));
    try {
                $response=$client->__call('HelloWorld',$data);
                print_r($response->HelloWorldResult);
            } catch (SoapFault $e) {
                print_r($e->getMessage());
            }
            exit;
            
            

    这是他的代码,这个代码贴出来能看出问题吗

    1
    打赏
    收藏
    点击回答
        全部回答
    • 共 0 条
    • Ю↘珂ル° 普通会员 1楼
      502 Bad Gateway

      502 Bad Gateway


      nginx
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部