Home > Article > Backend Development > How to use fgetc function
php The fgetc() function is used to read characters from the file pointer.
php fgetc() function syntax
Function: Read a character from the file pointer.
Syntax:
fgetc(file)
Parameters:
file Required. Specifies the documents to be checked.
Description: Returns a string containing one character, which is obtained from the file pointed to by file. Returns false if EOF is encountered.
php fgetc() function example
<?php $file = fopen("./test.txt","r"); echo fgetc($file); ?>
This article is an introduction to the PHP fgetc function. I hope it will be helpful to friends in need!
The above is the detailed content of How to use fgetc function. For more information, please follow other related articles on the PHP Chinese website!