PHPスクリプト/file_get_contents() の変更点
- 追加された行はこの色です。
- 削除された行はこの色です。
- PHPスクリプト/file_get_contents() へ行く。
- PHPスクリプト/file_get_contents() の差分を削除
*file_get_contents() [#d37dd1cc] ファイルの内容を全て文字列に読み込む **書式 [#cd342cf6] string file_get_contents ( string filename [, bool use_include_path [, resource context [, int offset [, int maxlen]]]] ) **例 [#s643d3e1] ホームページのタイトル<title></title>を抜き出して表示 <?php <?php $d = file_get_contents("http://ma21.ath.cx/"); $d = @mb_convert_encoding($d, "EUC-JP", constant("TO_ENCODING")); preg_match("/<title[^>]*>([^<]*)<\/title>/i",$d,$t); $title = trim($t[1]); print $title; ?> ?>