PHP 웹프로그래밍
[파일 디렉토리함수] fgetc() 파일로부터 한 문자씩 읽습니다.
fgetc() 파일로부터 한 문자씩 읽습니다.
string fgetc(int file_handle);
파일포인터를 인자로 받아서 한 문자씩 돌려줍니다.
<?
$fp = fopen("test.txt","r");
while(!feof($fp)) {
$readchar = fgetc($fp);
echo $readchar;
}
fclose($fp);
?>
string fgetc(int file_handle);
파일포인터를 인자로 받아서 한 문자씩 돌려줍니다.
<?
$fp = fopen("test.txt","r");
while(!feof($fp)) {
$readchar = fgetc($fp);
echo $readchar;
}
fclose($fp);
?>