downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SplFileObject::fgetcsv> <SplFileObject::fflush
[edit] Last updated: Sat, 07 Jan 2012

view this page in

SplFileObject::fgetc

(PHP 5 >= 5.1.0)

SplFileObject::fgetcGets character from file

설명

public string SplFileObject::fgetc ( void )

Gets a character from the file.

인수

이 함수는 인수가 없습니다.

반환값

Returns a string containing a single character read from the file or FALSE on EOF.

Warning

이 함수는 논리 FALSE를 반환하지만, 0이나 "" 등, 논리 FALSE로 취급할 수 있는 다른 값을 반환할 수 있습니다. 자세한 정보는 논리형 섹션을 참고하십시오. 이 함수의 반환값을 확인하려면 === 연산자를 이용하십시오.

예제

Example #1 SplFileObject::fgetc() example

<?php
$file 
= new SplFileObject('file.txt');
while (
false !== ($char $file->fgetc())) {
    echo 
"$char\n";
}
?>

참고



add a note add a note User Contributed Notes SplFileObject::fgetc
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites