Home >> PHP >> feof() function in PHP

feof() function in PHP

The feof() function used to tests for end of file on a file pointer.

Syntax

feof(file)

Example

$file = fopen("/content/people.txt","r");

while(! feof($file))
{
  echo fgets($file);

}

fclose($file);

Post Your Comment

Next Questions
fflush() function
fgetc() function
fgetss() function
file_put_contents() function
fileatime() function
filectime() function
filemtime() function
fileowner() function
fileperms() function
filesize() function
filetype() function
flock() function
fputs() function
fscanf() function
fstat() function
ftell() function
ftruncate() function
is_executable() function
is_file() function
is_link() function
is_readable() function
is_writable() function
link() function
linkinfo() function
pathinfo() function

Copyright ©2022 coderraj.com. All Rights Reserved.