我想从外部API检索大量记录数据。但是当我执行函数来执行此操作时,出现了这样的错误:
XML error parsing SOAP payload on line 1: No memory
这是我的功能代码:
public function get_all_data(){
ini_set("max_execution_time", "-1");
ini_set("memory_limit", "-1");
ignore_user_abort(true);
set_time_limit(0);
$url = "http://xxx.xx.x.xx:xxxx/services/DS_Get_Pending?wsdl";
$client = new \nusoap_client($url, 'wsdl');
$pDate = isset($_GET["pDate"]) ? $_GET["pDate"] : '26/02/2017 01:01:01';
$operation = 'getPending';
$param1 = array(
'pDate' => $pDate,
);
$result = $client->call($operation, $param1);
print_r($result);
exit();
}
如何解决此错误?