weixin_40005542 2020-11-30 07:18
浏览 0

用了httpserver和httpclient做测试,然后报错了

代码都是直接从readme里面取的,稍微调整了一下,server正常,client报错了

server


<?php require_once('hprosesrc\Hprose.php');

function hello($name) {
    return 'Hello ' . $name;
}

$server = new HproseHttpServer();
$server->addFunction('hello');
$server->start();
<?php require_once('hprosesrc\Hprose.php');
$client = new HproseHttpClient('http://127.0.0.1/helloserver.php');
echo $client->equire_once('hprosesrc\Hprose.php');
$client = new HproseHttpClient('http://127.0.0.1/helloserver.php');
echo $client->
<p>client</p>
<pre><code>
<?php require_once('hprosesrc\Hprose.php');
$client = new HproseHttpClient('http://127.0.0.1/helloserver.php');
echo $client->hello('World');
Object of class Hprose\Future could not be converted to string
of class Hprose\Future could not be converted to string

错误提示


Object of class Hprose\Future could not be converted to string

环境是windows php5.4.16

该提问来源于开源项目:hprose/hprose-php

  • 写回答

0条回答 默认 最新

    报告相同问题?