Reply
Old 07-26-2004, 05:08 PM \n in fputs
Junior Talker

Posts: 1
Trades: 0
i'm using this code to write text into n.aliases.php at the correct spot (*ENTER TXT HERE*):
PHP Code:
$fn "n.aliases.php";
$cont file_get_contents($fn);
$clrf fopen($fn,'w');
$etp "*ENTER TXT HERE*";
$trw "\$lion = \"lioness\";";
$cont str_replace("$etp""\n$trw\n$etp"$cont);
fputs($clrf$cont); 
and it all works fine.. except this line:
PHP Code:
$cont str_replace("$etp""\n$trw\n$etp"$cont); 
- i want it to break the line at the "\n" marks.. but it doesn't do that, and instead, i just get a huge block of text

am i doing something wrong?

Last edited by biocrite; 07-26-2004 at 05:11 PM..
biocrite is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 07-26-2004, 05:35 PM
Christopher's Avatar
Iced Cap

Posts: 3,113
Location: Toronto, Ontario
Trades: 0
What OS are you looking at? Windows uses \n\r, Unix uses \n and Macs use \r (OSX, you can use either \n or \r).
Christopher is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to \n in fputs
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.08919 seconds with 13 queries