Re: [PHP] Writing to files

2003-07-11 Thread Jason Giangrande
Thanks for the help guys. Jason On Fri, 2003-07-11 at 15:43, David Nicholson wrote: > Hello, > > > This is a reply to an e-mail that you wrote on Fri, 11 Jul 2003 at 20:37, > lines prefixed by '>' were originally written by you. > > Any ideas on how I can print the lines of my file in reverse o

Re: [PHP] Writing to files

2003-07-11 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Fri, 11 Jul 2003 at 20:37, lines prefixed by '>' were originally written by you. > Any ideas on how I can print the lines of my file in reverse order, > then? How about... $fp = fopen("yourfile.txt","r"); $filecontents = ""; while(!feof($fp)

Re: [PHP] Writing to files

2003-07-11 Thread Rob Adams
You could try using the file() function. Then loop backward through the array or use array_reverse. -- Rob "Jason Giangrande" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Any ideas on how I can print the lines of my file in reverse order, > then? Does fgets() always proce

Re: [PHP] Writing to files

2003-07-11 Thread CPT John W. Holmes
> Any ideas on how I can print the lines of my file in reverse order, > then? Does fgets() always process from the beginning of the file even > if you open the file with the pointer at the end? I tried to get the > line count of the file and go through each line of the file backwards > but that d

Re: [PHP] Writing to files

2003-07-11 Thread Jason Giangrande
Any ideas on how I can print the lines of my file in reverse order, then? Does fgets() always process from the beginning of the file even if you open the file with the pointer at the end? I tried to get the line count of the file and go through each line of the file backwards but that doesn't see

Re: [PHP] Writing to files

2003-07-11 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Fri, 11 Jul 2003 at 19:56, lines prefixed by '>' were originally written by you. > Is there a way to write to a beginning of a file without it > overwriting > data that's already there or do I have to write to the end of the file > in order to

[PHP] Writing to files

2003-07-11 Thread Jason Giangrande
Is there a way to write to a beginning of a file without it overwriting data that's already there or do I have to write to the end of the file in order to preserve data? I ask because it would be much easier to print the lines of the file out in order of last added first if I could add lines at th

RE: [PHP] writing to files

2002-05-31 Thread Jonathan Rosenberg
> Looks like you're using fopen() incorrectly. Try: > fopen("$file_name","r+"); How about just fopen($file_name, "r+"); instead. No need for the surrounding "s. -- JR -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Writing to Files

2002-04-05 Thread Rick Emery
pril 05, 2002 10:29 AM To: PHP General List (PHP.NET) Subject: [PHP] Writing to Files Hey All, I have recently been trying to create some logs for the install script I have been making (to make it easier for me to diagnose problems) but I am wondering how to create and write to text files

Re: [PHP] Writing to Files

2002-04-05 Thread R'twick Niceorgaw
General List (PHP.NET)" <[EMAIL PROTECTED]> Sent: Friday, April 05, 2002 11:29 AM Subject: [PHP] Writing to Files > Hey All, > I have recently been trying to create some logs for the install script I > have been making (to make it easier for me to diagnose problems) but I am &g

[PHP] Writing to Files

2002-04-05 Thread Sebastian A.
Hey All, I have recently been trying to create some logs for the install script I have been making (to make it easier for me to diagnose problems) but I am wondering how to create and write to text files. I know about the fopen() and fwrite() functions, which theoretically should enable me

Re: [PHP] Writing to files

2002-02-28 Thread William Lovaton
There is no need to use cookies, sessions, write to a file or somethings like that... just pass the vars from a page to another through hidden fields in the next page form. Eg. William El mié, 27-02-2002 a las 02:18, Chris Kay escribió: > > Question I have is, Anyway know of a better way t

RE: [PHP] Writing to files

2002-02-27 Thread Warren Vail
#x27; Cc: [EMAIL PROTECTED] Subject:RE: [PHP] Writing to files I know I can do this with sessions, reason I am asking is webserver should not be able to create file (for security reasons), I would of maybe thought php could create a file as a different user. php is not always used by th

RE: [PHP] Writing to files

2002-02-27 Thread Chris Kay
vices [EMAIL PROTECTED] --- -Original Message- From: Warren Vail [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 27 February 2002 6:51 PM To: Chris Kay Subject: RE: [PHP] Writing to files Suggest you understand how session management works. Whether you store in a file or database

RE: [PHP] Writing to files

2002-02-26 Thread Chris Kay
ECTED]] Sent: Wednesday, 27 February 2002 6:37 PM To: Chris Kay; [EMAIL PROTECTED] Subject: RE: [PHP] Writing to files What you are describing is exactly how session management works, storing things in a file in the /tmp directory. Perhaps you could consider using the session save handler functions to

RE: [PHP] Writing to files

2002-02-26 Thread Warren Vail
: Chris Kay [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 11:19 PM To: [EMAIL PROTECTED] Subject:[PHP] Writing to files Question I have is, Anyway know of a better way to store temp information? I have a problem that a script I use, uses many pages and after each page the

[PHP] Writing to files

2002-02-26 Thread Chris Kay
Question I have is, Anyway know of a better way to store temp information? I have a problem that a script I use, uses many pages and after each page the information from the form Is stored and the next page is shown ect It uses more than 20 variables so I can not store the data in cookies.

Re: [PHP] Writing to files

2001-05-14 Thread Jason Stechschulte
On Mon, May 14, 2001 at 03:05:30PM +0100, Tarrant Costelloe wrote: > What's the most basic syntax for writing to a text file using PHP. I would > like to store some variables in one and then retrieve them a later stage...? This will append This is pretty basic to the end of the file instead of ov

[PHP] Writing to files

2001-05-14 Thread Tarrant Costelloe
What's the most basic syntax for writing to a text file using PHP. I would like to store some variables in one and then retrieve them a later stage...? Taz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT