它的工作是通过命中网址但在cronjob脚本中不工作。无法在命令提示符中实例化不存在的类:soapclient。
$wsdl ='********/InvoicingService?wsdl';
$client = new SoapClient($wsdl, array("trace"=> 1,"exceptions" => 0));
$invoicecheck = array("username" => "*****","password" => "*****","invoiceNo" =>"****");
$proxy = $client->getProxy();
$value2 = $client ->checkInvStatus($invoicecheck);
$statusInvoice=$value2->return->responseMessage;
if($statusInvoice=='Paid'){
mail('mahtab46@gmail.com','wsdl check cron mail','paid');
echo 'working';
} else {
echo 'not worked';
}
答案 0 :(得分:0)
cronjob执行PHP CLI处理程序。这可能使用不加载soap扩展名的不同php.ini。尝试让PHP运行php -i > /tmp/test.txt
或其他东西,看看Soap功能是否在那里?