Read file character by character in PHP
Description
The following code shows how to read file character by character.
Example
/*from w w w . ja v a2 s. c o m*/
<?php
$file = fopen("test.txt","r");
while (! feof ($file)){
echo fgetc($file);
}
fclose($file);
?>
The code above generates the following result.