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

输出 :

 테스트 텍스트가있는 테스트 파일입니다.
유사한 함수
  • 주어진 파일 이름이 일반 파일인지 결정 is_file

    is_file

    주어진파일이름이일반파일인지결정
  • 업로드 된 파일을 새 위치로 이동하십시오 move_uploaded_file

    move_uploaded_file

    업로드된파일을새위치로이동하십시오
  • 정규화 된 절대 경로 이름을 반환합니다 realpath

    realpath

    정규화된절대경로이름을반환합니다
  • 임시 파일을 만듭니다 tmpfile

    tmpfile

    임시파일을만듭니다
  • 파일이 존재하고 읽을 수 있는지 확인하십시오 is_readable

    is_readable

    파일이존재하고읽을수있는지확인하십시오
  • 파일 읽기 (이진 파일에서 안전하게 사용) fread

    fread

    파일읽기(이진파일에서안전하게사용)
  • fwrite의 별칭 fputs

    fputs

    fwrite의별칭
  • 데이터 (메타 데이터는 아님)를 파일과 동기화합니다 fdatasync

    fdatasync

    데이터(메타데이터는아님)를파일과동기화