Php XMLRPC_URL API在codeigniter中不工作

Php XMLRPC_URL API在codeigniter中不工作,php,wordpress,codeigniter,Php,Wordpress,Codeigniter,我正在和Wordpress合作,我必须从Wordpress获得所有类别和帖子。我正在使用这个PHP代码 $XMLRPC_URL = "http://localhost/wordpress/xmlrpc"; // even if not WP multi site $BLOGID = 1; $USERNAME = 'admin'; // a user on requested wordpress, that user should have the desired permis

我正在和Wordpress合作,我必须从Wordpress获得所有类别和帖子。我正在使用这个PHP代码

$XMLRPC_URL = "http://localhost/wordpress/xmlrpc";

// even if not WP multi site
$BLOGID     = 1; 
$USERNAME   = 'admin'; 

// a user on requested wordpress, that user should have the desired permissions
$PASSWORD   = 'admin123';
$request    = xmlrpc_encode_request("wp.getPost",array($BLOGID, $USERNAME, $PASSWORD));
$curlHandle = curl_init();

curl_setopt($curlHandle, CURLOPT_URL, $XMLRPC_URL);
curl_setopt($curlHandle,CURLOPT_RETURNTRANSFER,1);
curl_setopt($curlHandle, CURLOPT_HEADER, false);
curl_setopt($curlHandle, CURLOPT_HTTPHEADER, array("Content-Type: text/xml"));
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, $request);

$response = curl_exec($curlHandle);
print_r($response);    

当我运行此脚本时,它会在浏览器中显示一个空白页。为什么响应没有打印到页面上?

有人来帮我吗,请帮我吗。