Hi guys:
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.
Thanx, Rodrigo de Oliveira Costa.
I want to open a text file which has 12 lines and
(1) insert a new line at line[0]
(2) re-save the text file only with 12 lines (Therefore line[12] gets
chopped out.
I had some code to do this with Perl.
open (NEW, ">$filepath\\$file");
print NEW "$something";
for ($i = 2; $i < 12; $i
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
Thanks
Alan
HI
I'm trying to run a php file in CGI mode and I get : Text file busy
I'm running many other files like that for years and this is the 1st
time I see such a message.
php.net seems to be down for me, any idea?
berber
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail:
Hi there,
I have got various text files which I need to convert on the fly to HTML
with PHP.
How do I convert this:
--- TEXT ---
CHART RETURN
Chart Date: blah
No. Artist - 'Track (Remix)' (Label)
1. blah - 'blah (blah mix)' (blah)
--- END TEXT---
to this:
--- HTML ---
CHART RETURN
Chart D
e-
> From: Rodrigo [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 20, 2002 4:57 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Text file
>
>
> Hi guys:
>
> What I need is a php file that will read a text file and show it on a
> html file.
>
> And it will also
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 o
For some reason I'm getting a Text file busy error when I try to
execute PHP scripts from the command line now. It used to work, but
now it doesn't. I do have #!/usr/bin/php at the top of my script. If
I feed the file to php (i.e. /usr/bin/php -f filename.php) it works.
Of course, I can
Ok, I don't get it... I put a string to one line ( $string =
str_replace("\n", "", $string); ) but when I put it in a text file I see
breaks right before . For example:
I have a text area and type:
1
22
333
then, I take that string and replace \n with .
$string = str_replace("\n", "", $string);
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
$filedata = file('yourfile.txt');
foreach($filedata as $key
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
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 logins 4:28:09 hrs/login
user2 19:0
hello everyone.
i'm wondering if i can do the following:
FIRST,
using php, can i create/generate a text file on-the-fly (not saved to a
server)
THEN,
insert the actual text file (and not its contents) into a mysql database.
many thanks in advance,
gregory hernandez
[EMAIL PROTECTED]
-
Hi,
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.
mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Greetings learned PHP(eople),
There have been a number of postings recently on opening and reading
files, and whilst I have read `em all I fail to make sense of it all.
Basicaly...I have a text file with entries in it...I wish to display the
contents of this file line by line in an HTML table :
A
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
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
> -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 - da
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 = $userfile_name.': '.$credit1."\n";
$fp = fopen('CREDIT.txt','a');
fwr
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?
http://www.submarino.com.br/wishlistclient.a
You can use a string to keep the file content. And then put it the
mysql(probably a BLOB field)
Best regards,
Andrey Hristov
IcyGEN Corporation
On Thursday 07 March 2002 11:30 pm, you wrote:
> hello everyone.
>
> i'm wondering if i can do the following:
>
> FIRST,
> using php, can i create/gen
On Thursday, March 7, 2002, at 04:30 PM, gregory hernandez wrote:
> i'm wondering if i can do the following:
>
> FIRST,
> using php, can i create/generate a text file on-the-fly (not saved to a
> server)
>
> THEN,
> insert the actual text file (and not its contents) into a mysql
> database.
Erik:
thank for answering my first question:
> the word "file" indicates that this is represented by an entity in a
> filesystem -- thus, it would be saved to a server.
now let me rephrase the second part. what i meant to say was the following:
can i insert the actual file (i.e. "document.txt
Are you planning on using MySQL as a filesystem?
There seems to be great confusion here.
Good luck!
--- gregory hernandez <[EMAIL PROTECTED]> wrote:
> hello everyone.
>
> i'm wondering if i can do the following:
>
> FIRST,
> using php, can i create/generate a text file
> on-the-fly (not sav
On Thursday, March 7, 2002, at 07:16 PM, gregory hernandez wrote:
> can i insert the actual file (i.e. "document.txt", of course with it
> contents) into a mysql?
>
> in other words, i don't want to read the contents of the file and
> insert the
> contents into a field in mysql. i want to ins
> But for storing images and PDFs or other binary data, there's
> no other way.
Actually, after having some problems with BLOB columns when
mysqldump'ing and moving the data into a new database, I did
find another way. I borrowed a trick from MIME mail handling,
and base64_encod'ed, then chunk_
ROTECTED]]
Sent: Thursday, March 07, 2002 4:10 PM
To: gregory hernandez
Cc: PHP NEWS
Subject: Re: [PHP] php, text file, and mysql
On Thursday, March 7, 2002, at 07:16 PM, gregory hernandez wrote:
> can i insert the actual file (i.e. "document.txt", of course with it
> contents) i
Hi, just two quick notes:
About text and similar fields:
http://mysql.com/doc/S/t/String_types.html
About not storing images:
http://mysql.com/doc/T/i/Tips.html (close to the middle).
That's it :-)
--
Julio Nobrega.
Um dia eu chego lá:
http://sourceforge.net/projects/toca
--
PHP Ge
> 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 type text boxes, use the following -
$var
Please note that if you include *any* kind of spaces or tabs or other
characters between the textare
XPODesigns.com
-Original Message-
From: Michael P. Carel [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 7:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] text file reading and overwrite
Hi,
Have a problem in reading a text file and displaying it in a text box
area,also what function
Message-
From: Chris Blake [mailto:[EMAIL PROTECTED]
Sent: 3. maaliskuuta 2003 10:58
To: [EMAIL PROTECTED]
Subject: [PHP] Text File open and display
Greetings learned PHP(eople),
There have been a number of postings recently on opening and reading files,
and whilst I have read `em all I fai
;
> // [1] => "row 2";
> // [2] => "row 3";
> // .
>
> for ($i = 0; $i < count($myFile); $i++)
> {
> print "Row ".($i+1).": ".$myFile[$i];
> };
> ?>
>
>
> Niklas
>
> -Original Message--
"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 :
>>
>>$cr
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
35 matches
Mail list logo