Jump to content

\n\r problems


Little Goat
 Share

Recommended Posts

Hi, I have a script I wrote to log information about people when they come to my site. it writes these logs to a file. I have tried making a new line with \n and \n\r and when I open the text file with both methods, it just shows a little box instead of a new line. how would I fix this?LGEdit: also, do you think it would be better to use SQL, or just a text file? I have to access the files later so a file might have advantages.

Link to comment
Share on other sites

A file might have it's advantages if you want to think of it that way, however, you could put them all into an SQL database and then create a script to display your logs in a more appealing way. It just depends on what you want.

Link to comment
Share on other sites

Always remember, it is only neccesary to use "\n" for kladblok texts, but both "\r\n" for any other texteditors that have special fonts, colors and other layouts installed (like MS Word or just Wordpad)While \r\n works for both plain text and not-plain text, \n only works for plain text. :)

Link to comment
Share on other sites

A file might have it's advantages if you want to think of it that way, however, you could put them all into an SQL database and then create a script to display your logs in a more appealing way. It just depends on what you want.

you could also write a script to disply your log in a more appealing way when your data is in a txt file as well.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...