##わからないこと
いつもお世話になっております。
phpファイル内で下記のようにexecを実行した結果、タイトルにあるようなエラーが出力されました。
php
1exec('C:\X_DRIVE\asp\home\laravel\vendor\bin\phantomjs.exe C:\X_DRIVE\asp\home\laravel\public\js\crawler.js http://www.kaigokensaku.mhlw.go.jp/02/index.php?action_kouhyou_pref_search_list_list=true&PrefCd=02&OriPrefCd=02&p_count=5&p_offset=10&method=pager&p_order_name=1&FromPage=Service', $arr);
※上記execにてphantomjsを起動し、URLのhtmlのスクレイピングを行っております。
###出力されたエラー
'PrefCd' is not recognized as an internal or external command, operable program or batch file. 'OriPrefCd' is not recognized as an internal or external command, operable program or batch file. 'p_offset' is not recognized as an internal or external command, operable program or batch file. 'method' is not recognized as an internal or external command, operable program or batch file. 'p_order_name' is not recognized as an internal or external command, operable program or batch file. 'FromPage' is not recognized as an internal or external command, operable program or batch file.
上記のエラーを解決しない限り、URL内のパラメータが解釈されないと思われるので、非常に困っています。
##追記
実際のコードは下記のようになっています。
$projectListUrl = 'http://www.kaigokensaku.mhlw.go.jp/'.$prefId.'/index.php?action_kouhyou_pref_search_list_list=true&PrefCd='.$prefId.'&OriPrefCd='.$prefId.'&method=pager&p_sort_name=47&p_order_name=1'; $ankenListUrl = "$projectListUrl.'&p_count='.$page.'&p_offset='.$pNum"; exec('C:\X_DRIVE\asp\home\laravel\vendor\bin\phantomjs.exe C:\X_DRIVE\asp\home\laravel\public\js\crawler.js '.$ankenListUrl, $arr);
どうかご助力いただけないでしょうか。
何卒よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2017/11/29 05:55
2017/11/29 05:59
退会済みユーザー
2017/11/29 06:15 編集
2017/11/30 01:09