feof

(FW >= 1.0)

feof - test if more data is available in a stream or file

Description

int feof(int handle)
This will return 1 (true) if more data is available, otherwise it will return 0

Parameters

handle

handle of a previously opened resource

Return Value

int value, 0 if no data available, 1 if more data is available

Examples

<pre><?
/**
* This example will read the file index.cgi line by line and format the output for display on the screen
**/
$f = fopen("/index.cgi","r");
if ($f) {
while (!feof($f)) {
print(htmlspecialchars(fgets($f))."\r\n");
}
fclose($f);
}

?>
</pre>