By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,116 Members | 1,509 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,116 IT Pros & Developers. It's quick & easy.

fwrite includes wrong character...

P: n/a
Hi all!

I use a simple line as this
fwrite($fil, $filename. "\n");

and when I look at the file I get the filename and an odd character in
the end, but the lineshift does work - AFAIK it should work.... any
ideas why?

I write a number of filenames to a file... that is all.

Sonnich

Jun 13 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Sonnich wrote:
Hi all!

I use a simple line as this
fwrite($fil, $filename. "\n");

and when I look at the file I get the filename and an odd character in
the end, but the lineshift does work - AFAIK it should work.... any
ideas why?

I write a number of filenames to a file... that is all.

Sonnich


You sure its not this? fwrite($fil, $filename. "\n")
^
Jun 13 '06 #2

P: n/a
NC
Sonnich wrote:

I use a simple line as this
fwrite($fil, $filename. "\n");

and when I look at the file I get the filename and an odd character in
the end, but the lineshift does work - AFAIK it should work.... any
ideas why?


Let me guess: you are viewing your file in Notepad on Windows. If
that's the case, try this:

fwrite($fil, $filename. "\r\n");

Cheers,
NC

Jun 14 '06 #3

P: n/a

Dave Kelly wrote:
Sonnich wrote:
I use a simple line as this
fwrite($fil, $filename. "\n");
and when I look at the file I get the filename and an odd character in
the end, but the lineshift does work - AFAIK it should work.... any
ideas why?
I write a number of filenames to a file... that is all.


You sure its not this? fwrite($fil, $filename. "\n")
^


I dont undetstand.... the ^ points to L or " ?

anyway, the fwrite($fil, $filename. "\r\n"); works (NC)

Thanks

Jun 14 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.