PHP fgetc() Function

The fgetc() function returns a single character from an open file.

string fgetc ( resource $handle )

Gets a character from the given file pointer.

Example -

Note -

This function is slow and should not be used on large files. If you need to read one character at a time from a large file, use fgets() to read data one line at a time and then process the line one character at a time with fgetc().

ParameterDescription
fileRequired. Specifies the file to check