Posted by Marco J.L on 04/06/05 23:44
Hello,
how can I read files into PHP. I can make a listing of a directory, but
reading the file content into the PHP goes wrong.
==== script ==========
<?php
$handle=opendir('nieuws');
while (false!==($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$fp = fopen($file,"rb");
fpassthru($fp);
fclose($fp);
echo $fp;
echo "<HR>";
}
}
closedir($handle);
?>
===========
Thanx,
Marco J.L.
[Back to original message]
|