| | #1 |
| Warrior Member Join Date: 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
Hi, I am trying to use a PHP file to write another PHP file. I've got most of my code working, but I can seem to write the characters "/n". Every time I do, the PHP file just skips to the next line. I have tried printing "/" and the "n" with two separate fwrite commands, but this still does not work. How do I get around this problem? Thanks, |
| | |
| |
| | #2 |
| Active Warrior War Room Member Join Date: 2007 Location: Orlando,FL , USA.
Posts: 60
Thanks: 3
Thanked 9 Times in 8 Posts
|
Does \\n work? Later, Dan |
| | |
| |
| | #4 |
| Warrior Member War Room Member Join Date: 2010 Location: Brisbane, Australia
Posts: 15
Thanks: 0
Thanked 2 Times in 2 Posts
|
As you have found, the \n has a special meaning (new line). To get around this try:- 1) Escape the slash '\' by using a double slash '\\', i.e. \\n (as said by Dan above) or 2) Enclose the string in single quotes rather than double quotes. PS: I'm assuming here that in your post that you meant \ instead of / |
| |
| | #5 |
| Lisa Dozois War Room Member Join Date: 2006 Location: Florida, USA.
Posts: 608
Thanks: 107
Thanked 254 Times in 118 Posts
| |
|
-- Lisa G
| |
| |
|
| Bookmarks |
| Tags |
| command, fwrite |
| |