Re: [PHP] Text file

2004-05-31 Thread John W. Holmes
alantodd wrote: What would be the easiest way to open a text file, remove a line if the line begins with a word from an array of words (there are 5 words I will be looking for) then write that back to the text file with everything removed ?php $lookfor = array('one','two','three','four','five');

Re: [PHP] Text file wont' have newlines?

2004-05-29 Thread Torsten Roehr
Ashwin Purohit [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi everybody, I have this script in a file that allows users to upload files, and I want to know who submitted what so I write $userfile_name and $credit1(their name) to CREDIT.txt in the same directory like so :

Re: [PHP] Text file wont' have newlines?

2004-05-29 Thread Daniel Clark
Needs a new line and return. fwrite($fp, ($credit . \n\r) ); Hi everybody, I have this script in a file that allows users to upload files, and I want to know who submitted what so I write $userfile_name and $credit1(their name) to CREDIT.txt in the same directory like so : $credit =

Re: [PHP] Text file wont' have newlines?

2004-05-29 Thread Ashwin Purohit
Ok, thanks much! It works now. Needs a new line and return. fwrite($fp, ($credit . \n\r) ); Hi everybody, I have this script in a file that allows users to upload files, and I want to know who submitted what so I write $userfile_name and $credit1(their name) to CREDIT.txt in the same directory

RE: [PHP] Text file manipulation question.

2003-07-15 Thread Ford, Mike [LSS]
-Original Message- From: Lloyd Bayley [mailto:[EMAIL PROTECTED] Sent: 15 July 2003 00:21 I'm still in the learning stages of PHP and require some help with a small problem. I need to take a text file which looks like this (and no I can't get it output in CSV - damn and

Re: [PHP] Text file manipulation question.

2003-07-14 Thread Curt Zirzow
Lloyd Bayley [EMAIL PROTECTED] wrote: Greetings All! I'm still in the learning stages of PHP and require some help with a small problem. I need to take a text file which looks like this (and no I can't get it output in CSV - damn and blast!) user1 26:48:59 6

Re: [PHP] Text file manipulation question.

2003-07-14 Thread Lloyd Bayley
Thankyou! That works a treat! Lloyd. :-) At 11:36 PM 14/07/2003 +, you wrote: Lloyd Bayley [EMAIL PROTECTED] wrote: Greetings All! I'm still in the learning stages of PHP and require some help with a small problem. I need to take a text file which looks like this (and no I can't get it

RE: [PHP] Text File open and display

2003-03-03 Thread Niklas Lampén
You get a file to an array of lines with file(). Example: ? $myFile = file(text_file.txt); // Now $myFile is an array looking like // [0] = row 1; // [1] = row 2; // [2] = row 3; // . for ($i = 0; $i count($myFile); $i++) { print Row .($i+1).: .$myFile[$i]; }; ? Niklas

RE: [PHP] Text File open and display

2003-03-03 Thread Chris Blake
Muchos grassy arse...works perfectly On Mon, 2003-03-03 at 11:06, Niklas Lampén wrote: You get a file to an array of lines with file(). Example: ? $myFile = file(text_file.txt); // Now $myFile is an array looking like // [0] = row 1; // [1] = row 2; // [2] = row 3; // .

Re: [PHP] text file reading and overwrite

2003-02-24 Thread Patrick Teague
Have a problem in reading a text file and displaying it in a text box area,also what function should i used to overwrite an existing text file. For textarea type text boxes, use the following - textarea$var/textarea Please note that if you include *any* kind of spaces or tabs or other

RE: [PHP] text file reading and overwrite

2003-02-24 Thread Matt Honeycutt
I can't tell you anything about your problem without knowing what's going on (error messages are helpful). As for overwriting a file, just use: fopen($filename,w); The w option tells it to open the file for writing and to truncate it to zero-length. ---Matt, XPODesigns.com -Original

RE: [PHP] Text file

2002-05-20 Thread Scott Hurring
... so open up the text file and read it. What problem are you having? Are permissions set correctly? Are you making sure to escape \ on Win? --- Scott Hurring Systems Programmer EAC Corporation [EMAIL PROTECTED] Voice: 201-462-2149 Fax: 201-288-1515 -Original Message- From:

Re: [PHP] Text file

2002-05-20 Thread Miguel Cruz
On Mon, 20 May 2002, Rodrigo wrote: What I need is a php file that will read a text file and show it on a html file. And it will also write to a text file, but at the end of the file. Well, you're in luck; that's all very easy to do. Are you having a specific problem with some aspect of

RE: [PHP] Text File Formating.

2002-04-29 Thread Cal Evans
the manual is your friend. http://www.php.net/manual/en/function.nl2br.php * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Randum Ian [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 10:20 AM To: PHP Subject: [PHP] Text

[PHP] Re: php, text file, and mysql

2002-03-07 Thread Julio Nobrega Trabalhando
If you are not going to save, I wouldn't call it a file :-) Just store the contents in a string and insert in a TEXT (etc) field. -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho?