Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 07-26-2004, 06: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 06:11 PM..
biocrite is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-26-2004, 06:35 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
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).
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

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.17941 seconds with 12 queries