PHPRPC Remote Call error, do not know what reason

Source: Internet
Author: User

I am learning phprpc Remote Call, follow the online tutorial, found the error: Incorrect response ID (Request ID:1, Response ID:) n; good tangle, ask for advice. The post code is as follows:
service side, member.php
<?php
require_once ' jsonrpcserver.php ';
/** 
User:administrator
DATE:2015/12/28

time:11:06
*/ 
class member

Public function GetName ()
{return ' hello word ';//return string}


//Service-side call
$myExample = new Member ();
//Injection Instance
Jsonrpcserver::handle ($myExample) or print ' no request ';
Client: client.php
<?php
/** 
User:administrator
DATE:2015/12/28
time:11:07*/require_once ' jsonrpcclient.php ';//$url = ' http://localhost/phprpc/server.php '; $url = ' http:// Localhost/phprpc/member.php '; $myExample = new Jsonrpcclient ($url); Echo ';p rint_r ($myExample);//Client call

Try

$name = $myExample->getname ();
echo $name;
} catch (Exception $e)

Echo nl2br ($e->getmessage ()). '
'. "N";
}

PHPRPC Remote Call error, do not know what reason

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.