Phpfgetc function. Phpfgetc function fgetc (in PHP4, in PHP5) fgetc-gets a character from the file pointer description string fgetc (resource $ processing) to get a character from the given file pointer. Parameter handle php fgetc function
Fgetc
(PHP 4 and PHP 5)
Fgetc-get the character pointer from the file
Description
String fgetc (resource $ processing)
Gets a character pointer from a given file.
Parameters
Handle
The file pointer must be valid and must point to a file that successfully opens fopen () or fsockopen () (and has not closed fclose ()).
Return value
Returns a string containing a single character to read the file pointed by processing. Returns the false eof analysis.
Warning
This function may return a Boolean error, and can return a non-Boolean value calculated as false, such as 0 or "". Read some Boolean values carefully for more information. Use the ===operator to test the return value function.
Instance
Example #1 fgetc ()
$ Fp = fopen('somefile.txt ', 'r ');
If (! $ Fp ){
Echo 'could not open file somefile.txt ';
}
While (false! ==( $ Char = fgetc ($ fp ))){
Echo "$ charn ";
}
?>
The http://www.bkjia.com/PHPjc/445481.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445481.htmlTechArticlephp fgetc function fgetc (PHP 4, PHP 5) fgetc-gets a character from the file pointer description string fgetc (resource $ processing) to get a character from the given file pointer. Parameter handle...