You can edit almost every page by Creating an account. Otherwise, see the FAQ.

File get contents();

提供:EverybodyWiki Bios & Wiki
移動先:案内検索

プログラミング言語PHPの関数である。 この関数は因数1 に指定したファイルパス(urlも可能)の内容を取得し返す関数である。

使用方法の例[編集]

$html=file_get_contents("http://example.org"); この例では変数htmlにhttp://example.orgの内容を代入しています。

他関数との連携の例[編集]

$html=file_get_contents("http://google.com/search?q=".urlencode($_GET["q"])); echo($html); この例ではgoogle.comの検索結果をこのページに表示します。 $html=file_get_contents("http://ysm.epizy.com"); echo($html); この例ではysm.epizy.comの内容をこのページに表示します。 $html=file_get_contents("http://google.com"); file_put_contents("index.html",$html); この例ではgoogle.comの内容をindex.htmlに保存しています。

関連項目[編集]


This article "File get contents();" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:File get contents();.



Read or create/edit this page in another language[編集]