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

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
try creating a script with fopen(), fwrite(), etc. When you run into problems, ask here. $filex = fopen("myfile","w"); fwrite( $filex, "write this here"); fclose($filex); -Original Message- From: Sebastian A. [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 10:29 AM To: PHP Gener

Re: [PHP] Writing to Files

2002-04-05 Thread R'twick Niceorgaw
http://www.php.net/manual/en/function.printf.php try sprintf to format the string and then fwrite I use text files to log debug msgs in my programs as they are not too heavy duty applications. - Original Message - From: "Sebastian A." <[EMAIL PROTECTED]> To: "PHP General List (PHP.NET)"

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
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 store the session data in your protected database (MySQL?). Warren Vail -Original Message- From: Chri

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