search

Home  >  Q&A  >  body text

phpunit failed to create SoapClient in laravel wsdl path not found

I created new SoapClient('soap/SpService.wsdl', $options);
php artisan serve runs normally

Prompt when testing phpunit
PHP Warning: Uncaught exception 'ErrorException' with message 'SoapClient::SoapClient(): I/O warning: failed to load external entity "soap/SpService.wsdl"

If I use SoapClient('public/soap/SpService.wsdl', $options);
phpunit can run again, but laravel execution cannot find wsdl

It must be a problem with loading the wsdl path. How to unify the access path?

仅有的幸福仅有的幸福2824 days ago1048

reply all(1)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-16 13:04:13

    laravel public_path('soap/SpService.wsdl')

    Solved! ! ! , see what time it is now, or a newbie who is not familiar with php, and has been struggling to this point.

    reply
    0
  • Cancelreply