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 같이 보기[ | ]
- PHP file()
- PHP fgets()
- PHP fread()
- PHP readfile()
- PHP file_put_contents()
- PHP stream_getcontents()
- PHP stream_context_create()
- PHP $http_response_header
- PHP file_get_contents() 타임아웃 적용
- PHP Warning: URL file-access is disabled in the server configuration
- PHP 함수 curl_get_contents()
- 함수 file_get_contents()
3 참고[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.