|
Posted by Chung Leong on 04/08/05 02:27
"Marco J.L" <luyendyk@yahoo.com.news> wrote in message
news:d31i23$pu$1@reader10.wxs.nl...
> 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.
>
>
array_map('readfile', glob('nieuws/*.*'));
Navigation:
[Reply to this message]
|