Re: [PHP] file reading and textarea problem

2001-10-03 Thread Philip Olson


If you use fgets(), you can loop through it like the example does :

  http://www.php.net/fgets

Or, consider the file() function which automagically assigns each line to
an element of the array.

  http://www.php.net/file

Or, you could open the file as a one string using fread(), see the
example :

  http://www.php.net/fread


regards,
Philip Olson


On Wed, 3 Oct 2001, Nikola Veber wrote:

 Hi !
 
 I'm having a problem with the following : I have a log file on my site, that records 
date, 
 time and the user's system. Each entry is placed in a new line. Now, I can only read 
 the first line with fgets($filename, 4096). Is there another function, or the 4096 
number 
 should be changed in order to let me read the whole file.
 
 Thanks
 Nikola
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] file reading and textarea problem

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)

Yup.

 fread()

Read on

 PHP.net/fread
 PHP.net/fgets

 ...to learn how to manipulate files.

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Nikola Veber [mailto:[EMAIL PROTECTED]] 
Sent: mercoledi 3 ottobre 2001 11.11
To: php forum
Subject: [PHP] file reading and textarea problem


Hi !

I'm having a problem with the following : I have a log file on my site,
that records date, 
time and the user's system. Each entry is placed in a new line. Now, I
can only read 
the first line with fgets($filename, 4096). Is there another function,
or the 4096 number 
should be changed in order to let me read the whole file.

Thanks
Nikola



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] file reading and textarea problem

2001-10-03 Thread Mukul Sabharwal

Hi,

fopen let's you read the whole file. Try this
tutorials on files for a more hands on approach :

http://www.paphe.com/php/tutorials/111000.php

=
*
Know more about me:
http://www.geocities.com/mimodit
*

__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]