致命错误:无法实例化不存在的类:soapclient in

时间:2014-02-21 07:21:30

标签: php soap

它的工作是通过命中网址但在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';
}

1 个答案:

答案 0 :(得分:0)

cronjob执行PHP CLI处理程序。这可能使用不加载soap扩展名的不同php.ini。尝试让PHP运行php -i > /tmp/test.txt或其他东西,看看Soap功能是否在那里?