環境…wordpress4.3.1
testページはtestページテンプレートを読んでます
php
1<a href="http://example.com/test?id=1">クリックして飛ばす</a>
クリックして飛んだtestページテンプレートファイルにて、
php
1$url1 = "http://news.yahoo.co.jp/"; 2$html1 = file_get_contents($url1); 3$url2 = 'http://www.yahoo.co.jp/'; 4$html2 = file_get_contents($url2);
php
1$site_url = "http://news.yahoo.co.jp/"; 2$html1 = file_get_contents($site_url); 3$url = 'http://www.yahoo.co.jp/'; 4$html2 = file_get_contents($url);
前者はエラーにならないのに、
後者は404ページエラーになるのはなぜだか教えて下さい。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。