fgetc
Prende un carattere da un puntatore a file
Descrizione
string fgetc(resource $handle)
Restituisce una stringa contenente un singolo carattere letto dal file puntato
da handle.
Restituisce false alla fine del file (EOF).
Un esempio per fgetc <?php $fp = fopen('somefile.txt', 'r'); if (!$fp) { echo 'Non si riesce ad aprire il file somefile.txt'; } while (false !== ($char = fgetc($fp))) { echo "$char\n"; } ?>
Vedere anche fread, fopen, popen, fsockopen e fgets.