PHP file_get_contents()

Jmnote bot (토론 | 기여)님의 2020년 11월 2일 (월) 02:57 판 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

PHP file_get_contents()
  • 전체파일을 문자열로 읽어들이는 PHP 함수
  • 로컬파일, 원격파일 모두 가능
PHP
Copy
$str = file_get_contents('test.txt');
echo $str;
# John Smith
PHP
Copy
$str = file_get_contents('http://zetawiki.com/ex/txt/utf8hello.txt');
echo $str;
# Hi.
# 안녕.
# おはよう。

2 같이 보기[ | ]

3 참고[ | ]