현재 위치: > 함수 카테고리 모음> 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>

输出 :

 테스트 텍스트가있는 테스트 파일입니다.
유사한 함수
  • 파일에 데이터를 작성하십시오 file_put_contents

    file_put_contents

    파일에데이터를작성하십시오
  • 얻은 파일 그룹 filegroup

    filegroup

    얻은파일그룹
  • disk_free_space의 별칭 diskfreespace

    diskfreespace

    disk_free_space의별칭
  • 주어진 파일 이름이 디렉토리인지 확인하십시오 is_dir

    is_dir

    주어진파일이름이디렉토리인지확인하십시오
  • 파일에 대한 변경 동기화 (메타 데이터 포함) fsync

    fsync

    파일에대한변경동기화(메타데이터포함)
  • 주어진 파일 이름이 실행 가능한지 확인하십시오 is_executable

    is_executable

    주어진파일이름이실행가능한지확인하십시오
  • 파일 또는 URL을 엽니 다 fopen

    fopen

    파일또는URL을엽니다
  • 전체 파일을 배열로 읽으십시오 file

    file

    전체파일을배열로읽으십시오