Php &引用;网络错误:500内部服务器错误-http://localhost/cc/client"
我使用rpc库与客户机和服务器通信,下面是我的代码Php &引用;网络错误:500内部服务器错误-http://localhost/cc/client",php,android,zend-framework,Php,Android,Zend Framework,我使用rpc库与客户机和服务器通信,下面是我的代码 <?php class ClientController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ } public function indexAction() { // action body
<?php
class ClientController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
// action body
echo "Hello you are in index";
$client = new Zend_XmlRpc_Client('Server url');
//var_dump($client);
try {
echo "cf doesent called";
$data = $client->call('cf.test');
$this->view->data = $data;
} catch (Zend_XmlRpc_Client_HttpException $e) {
require_once 'Zend/Exception.php';
throw new Zend_Exception($e);
} catch (Zend_XmlRpc_Client_FaultException $e) {
require_once 'Zend/Exception.php';
throw new Zend_Exception($e);
}
}
}
class ServerController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
// action body
$this->_helper->viewRenderer->setNoRender();
$server = new Zend_XmlRpc_Server();
$server->setClass('Application_Model_Data', 'cf');
echo $server->handle();
}
}
<?php
class Application_Model_Data
{
/**
* Test method
*
* @return string
*/
public function test()
{
return 'Hello XMLRPC!';
}
}
检查日志或激活错误报告(如果尚未执行)。这个错误几乎可以是所有的错误。在php错误日志中,我没有检查任何东西。。