> <?php
> $wfn = "main.$res.txt";
> $wbs = @fopen ($wfn, "r");
> if (!$wbs) { echo ("Unable to locate file requested. [Error Line: 4]<br>\n");
>return; }
> $wct = fread ($wbs, filesize ($wfn));
> echo ($wct + "\n");
> fclose ($wbs);
> ?>
>
> all it seems to be outputting is '0' (if i tweak the .txt it sometimes outputs '1')
>
> example of the main.12801024.txt is:
>
> <html>
> <head>
> <title>test</title>
> </head>
> <body></body>
> BLAH!
> </html>
>
> if anyone out there can help me thanks heaps.
wouldn't it be easier to include the file?
if you check if you can read the file first
(http://www.php.net/manual/en/function.is-readable.php)
[or exit with error...]
you can then use include() to suck in the html
(http://www.php.net/manual/en/function.include.php)
don't know if this way is the "right way to do it" or not, but it worked
for me...
later
marty
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug