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
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)
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
> 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
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
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
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
> 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
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
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
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
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
#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
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
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
: 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
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.
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
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
19 matches
Mail list logo