class RpcController extends Zend_Controller_Action {
public function indexAction() {
$this->_helper->viewRenderer->setNoRender();
$server = new Zend_XmlRpc_Server();
$server->setEncoding('utf-8');
$server->setClass('MyLib_Rpc');
$this->getResponse()->clearBody();
$this->getResponse()->setBody($server->handle());
}
}
class MyLib_RPC {
/**
* @param string $key
* @return string
*/
public function login($key) {
$sid = md5($key);
retunr $sid;
}
}
print_r($server->getSystem()->methodSignature('login'));
Question:
This code work on different servers. On some servers it's ok and return
Array
(
[0] => Array
(
[returnType] => void
[parameters] => Array
(
[0] => string
)
)
)
on other its return struct.
Where is problem ? What php extensions need for this code ?
--
Andrey Korolyov | WEB Developer
e | akorolyov@gmail.com
没有评论:
发表评论