laravel中phpunit创建SoapClient失败wsdl路径找不到
仅有的幸福
仅有的幸福 2017-05-16 13:02:13
0
1
933

我创建new SoapClient('soap/SpService.wsdl', $options);
php artisan serve 运行正常

phpunit测试时候提示
PHP Warning: Uncaught exception 'ErrorException' with message 'SoapClient::SoapClient(): I/O warning : failed to load external entity "soap/SpService.wsdl"

如果我用SoapClient('public/soap/SpService.wsdl', $options);
phpunit又可以运行,但是laravel执行找不到wsdl

肯定是加载这个wsdl路径问题,怎么统一一个访问路径?

仅有的幸福
仅有的幸福

reply all (1)
过去多啦不再A梦

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.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!