Liam Gibbs wrote:
It looks like you are viewing a dos/windows file on unix. The ^M is
carriage return, which is needed as part of a dos/window end of line
sequence (carriage return, line feed) whereas unix uses just line feed.
Nope. They're UNIX-created and UNIX-modified. Does it matter if I downl
At 16:16 4-4-2003, you wrote:
> It looks like you are viewing a dos/windows file on unix. The ^M is
> carriage return, which is needed as part of a dos/window end of line
> sequence (carriage return, line feed) whereas unix uses just line feed.
Nope. They're UNIX-created and UNIX-modified. Does it
\r shows up as ^M in many unix editors, so if you don't want ^M there,
don't put \r into the file
Liam Gibbs wrote:
It looks like you are viewing a dos/windows file on unix. The ^M is
carriage return, which is needed as part of a dos/window end of line
sequence (carriage return, line feed) where
> It looks like you are viewing a dos/windows file on unix. The ^M is
> carriage return, which is needed as part of a dos/window end of line
> sequence (carriage return, line feed) whereas unix uses just line feed.
Nope. They're UNIX-created and UNIX-modified. Does it matter if I downloaded
them o
Liam Gibbs wrote:
So which is it that will keep my files from having ^M after PHP is finished fopen(), fputs(), and fclose() with them? \n, \r, and \n\r all seem to reinsert ^M at the ends of all my lines.
It looks like you are viewing a dos/windows file on unix. The ^M is
carriage return, which
On Friday 04 April 2003 14:38, Liam Gibbs wrote:
> So which is it that will keep my files from having ^M after PHP is finished
> fopen(), fputs(), and fclose() with them? \n, \r, and \n\r all seem to
> reinsert ^M at the ends of all my lines.
1) Could you summarise what you're trying to do
2) Sho
John W. Holmes wrote:
Yeah, I could use a decent text editor, but not everyone who uses my
site
will use it. I need something that can edit them out after download.
Wouldn't it be smarter to eliminate them before it was saved on Windows?
You could read in the file and get rid of all of the \r c
> > Use a decent text editor that'll save the files in Unix format... even
> > if you're on a PC.
>
> Yeah, I could use a decent text editor, but not everyone who uses my site
> will use it. I need something that can edit them out after download.
If you don't have that dos2unix conversion utility
> > Use a decent text editor that'll save the files in Unix format...
even
> > if you're on a PC.
>
> Yeah, I could use a decent text editor, but not everyone who uses my
site
> will use it. I need something that can edit them out after download.
Wouldn't it be smarter to eliminate them before it
> Use a decent text editor that'll save the files in Unix format... even
> if you're on a PC.
Yeah, I could use a decent text editor, but not everyone who uses my site
will use it. I need something that can edit them out after download.
--
PHP General Mailing List (http://www.php.net/)
To unsub
> I'm downloading a file from Windows to Linux through PHP.
Understandably,
> there are ^Ms at the end of my lines. Is there a PHP function I can
use to
> delete them?
Use a decent text editor that'll save the files in Unix format... even
if you're on a PC.
Let's NOT get into a
text-editor-sugges
Robert Cummings wrote:
I know there's a binary for doing exactly that in linux but I can't for the
life of me remember the name. If you're text editor is any good you should
be able to do a search and replace for "\r" with "". I use joe, but that's
hardly the editor of choice for most.
Cheers,
Rob
I know there's a binary for doing exactly that in linux but I can't for the
life of me remember the name. If you're text editor is any good you should
be able to do a search and replace for "\r" with "". I use joe, but that's
hardly the editor of choice for most.
Cheers,
Rob.
Liam Gibbs wrote:
>
Im not sure, but I believe Ive noticed this when I fopen() a file with
the 'b' value like fopen($foo, 'wb');
I may be totally wrong...
Brandon Orther wrote:
Hello,
Does anyone know a way around all the ^M at the end of each line that my
php file writes to on a linux box?
ww.webintellects.com
-Original Message-
From: 1LT John W. Holmes [mailto:holmes072000@;charter.net]
Sent: Thursday, October 31, 2002 10:42 AM
To: Brandon Orther; PHP User Group
Subject: Re: [PHP] ^M at the end of each line when I use php to write
file
You're probably writin
erson [mailto:evan@;coeus-group.com]
Sent: Thursday, October 31, 2002 10:08 AM
To: Brandon Orther; [EMAIL PROTECTED]
Subject: Re: [PHP] ^M at the end of each line when I use php to write
file
a what does your code look like??? What happens when you
$fp = fopen("temp", a+);
for
You're probably writing \r\n instead of just \n.
---John Holmes...
- Original Message -
From: "Brandon Orther" <[EMAIL PROTECTED]>
To: "PHP User Group" <[EMAIL PROTECTED]>
Sent: Thursday, October 31, 2002 12:44 PM
Subject: [PHP] ^M at the end of each line when I use php to write file
, 2002 10:08 AM
To: Brandon Orther; [EMAIL PROTECTED]
Subject: Re: [PHP] ^M at the end of each line when I use php to write
file
a what does your code look like??? What happens when you
$fp = fopen("temp", a+);
for ( $x=0 ; $x<10 ; $x++ )
fputs($fp, "$x\n");
a what does your code look like??? What happens when you
$fp = fopen("temp", a+);
for ( $x=0 ; $x<10 ; $x++ )
fputs($fp, "$x\n");
fclose($fp);
???
On Thursday 31 October 2002 09:44 am, Brandon Orther wrote:
> Hello,
>
> Does anyone know a way around all the ^M at the end of eac
19 matches
Mail list logo