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

file_put_contents

ファイルにデータを書き込みます
名前:file_put_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_put_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 string double-quoted-string">"hello world。テスト!"</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

出力:

 26
類似の関数
  • 指定されたファイル名が書き込み可能かどうかを判断します is_writable

    is_writable

    指定されたファイル名が書き込み可能かどう
  • ディレクトリを削除します rmdir

    rmdir

    ディレクトリを削除します
  • ファイル全体を配列に読んでください file

    file

    ファイル全体を配列に読んでください
  • 出力ファイル readfile

    readfile

    出力ファイル
  • ファイルに書き込む(バイナリファイルで安全に使用される) fwrite

    fwrite

    ファイルに書き込む(バイナリファイルで安
  • 開いたファイルポインターを介してファイル情報を取得します fstat

    fstat

    開いたファイルポインターを介してファイル
  • link()またはunset()を参照してください(PHPにはキーワードや関数の削除がありません) delete

    delete

    link()またはunset()を参照し
  • ファイルにデータを書き込みます file_put_contents

    file_put_contents

    ファイルにデータを書き込みます
人気記事(にんききじ)