|
$this->load->helper('date');
$title= $this->input->post('title');
$content=$this->input->post('content');
$format = 'DATE_W3C';
$time = time();
$mydate=standard_date($format, $time);
$this->load->library('xmlrpc');
$this->xmlrpc->set_debug(true);
$this->xmlrpc->server('XML-RPC RUL', 80);
$this->xmlrpc->method('方法名');
$post=array(
array( $mydate,'dateTime.iso8601'),
array( $content,'string'),
array( $title,'string')
);
$request = array(
array('23','string'),
array('用户名','string'),
array('密码','string'),
array($post,'struct'),
array('true','boolean'));
//print_r( $request);
$this->xmlrpc->request($request);
if ( ! $this->xmlrpc->send_request())
{
echo $this->xmlrpc->display_error();
}
请问我以上代码正确吗?高手指点 |
|