fclose
Hello,
I have these lines:
$fp = "test.txt";
if ($datei = fopen ($fp, "r")) {
while (!feof ($datei)) {
$zeichen = fgetc ($datei);
echo ($zeichen);
}
fclose($fp);
}
The file is opened correctly and the content of the file is shown. But
below the content there is the error:
Warning: fclose(): supplied argument is not a valid stream resource in
........... on line 9
Where is the mistake?
Thanks Werner
|