現在の位置: ホーム> 関数カテゴリ一覧> file_get_contents

file_get_contents

ファイル全体を文字列に読み取ります
名前:file_get_contents
カテゴリ:ファイルシステム
対応言語:php
一言説明:ファイルを文字列に読み取ります。

实例

<span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">file_get_contents</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"test.txt"</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

输出:

これは、テストテキストを含むテストファイルです。
類似の関数
  • link()またはunset()を参照してください(PHPにはキーワードや関数の削除がありません) delete

    delete

    link()またはunset()を参照し
  • シンボリックリンクのすべてのグループを変更します lchgrp

    lchgrp

    シンボリックリンクのすべてのグループを変
  • ファイルの変更時間を取得します filemtime

    filemtime

    ファイルの変更時間を取得します
  • ファイル許可を取得します fileperms

    fileperms

    ファイル許可を取得します
  • disk_free_spaceのエイリアス diskfreespace

    diskfreespace

    disk_free_spaceのエイリア
  • ファイル全体を文字列に読み取ります file_get_contents

    file_get_contents

    ファイル全体を文字列に読み取ります
  • パターンでファイル名を一致させます fnmatch

    fnmatch

    パターンでファイル名を一致させます
  • ファイルを読む(バイナリファイルで安全に使用される) fread

    fread

    ファイルを読む(バイナリファイルで安全に