Re: reading from files
| From: | Jason Wong | Date: | Fri, 17 Sep 2004 21:50:21 +0000 |
| Subject: | Re: reading from files | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-197060@lists.php.net to get a copy of this message | ||
On Saturday 18 September 2004 04:58, Steve Brown wrote:
> > I am wondering how to read lines from a file to a php array? I would like
> > to integrate a logfile into a html site. Is it possible to read line by
> > line and to check how many lines there are in total?
>
> I'm new here, so someone please tell me if "RTFM" is frowned upon as a
> response. :)
Yes. From manual > Filesystem Functions > Table of Contents (ie list of
functions), it's pretty obvious:
file -- Reads entire file into an array
that the OP never even bothered to try finding out the answer before asking
the list.
> http://www.php.net/fgets
Sorry, close, but no cigar.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
"No, no, I don't mind being called the smartest man in the world. I just wish
it wasn't this one."
-- Adrian Veidt/Ozymandias, WATCHMEN
*/