(PHP 5 >= 5.1.0, PHP 7)
SplFileObject::fgetc — Gets character from file
Gets a character from the file.
이 함수는 인수가 없습니다.
Returns a string containing a single character read from the file or FALSE
on EOF.
Example #1 SplFileObject::fgetc() example
<?php
$file = new SplFileObject('file.txt');
while (false !== ($char = $file->fgetc())) {
echo "$char\n";
}
?>