我建立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路徑問題,怎麼統一一個訪問路徑?
laravel public_path('soap/SpService.wsdl')
解決! ! ! ,看現在是幾點,還是新手不熟悉php,折騰到這個點。