Current Location: Home> Function Categories> file_get_contents

file_get_contents

Read the entire file into a string
Name:file_get_contents
Category:File system
Programming Language:php
One-line Description:Read the file into a string.

实例

<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>

输出:

This is a test file with test text.
Similar Functions