<?php namespace App\Services; use Hprose\Http\Client; class TestClient { public function index() { //服务端路由在api路由中配置,则此处路由应加上api/test //实例化可选参数 加上false 即创建创建一个同步的 HTTP 客户端 //不写false 为创建一个异步的 HTTP 客户端 $user =new Client('http://lorder.liexin.net/hprose/service', false); // $res = $user->test(); $res=$user->orderExport(json_encode(['limit'=>10, 'p'=>1])); print_r($res); } }