環境
laradock
laravel5.6
windows10
エラー状況
bash
1# ブラウザで「http://test.local」には正常にアクセスできます。 2 3# php artisan tinkerで以下を試しました 4Psy Shell v0.9.9 (PHP 7.2.19-1+ubuntu16.04.1+deb.sury.org+1 — cli) by Justin Hileman 5>>> $header = get_headers("http://test.local"); 6PHP Warning: get_headers(http://test.local): failed to open stream: Cannot assign requested address in Psy Shell code on line 1 7>>> 8 9# controller上でも試しましたが以下のエラーが出ました 10ErrorException (E_WARNING) 11get_headers(http://test.local): failed to open stream: Cannot assign requested address 12 13# ちなみにfile_get_contentsでも同様のエラーになります
設定
win10 hosts
bash
1127.0.0.1 test.local
nginx バーチャルホスト
bash
1server_name test.local; 2root /var/www/laravel/public; 3index index.php index.html index.htm;
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/07/20 12:56