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');
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 :
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 =
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
-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
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
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
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
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;
// .
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
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
... 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:
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
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
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?
15 matches
Mail list logo