Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hi every one,

 

I am in chapter 11 page 360 step 11 backing up database. Every things works perfect. The only problem I have is new line after wrtting each record to text file.

 

gzwrite ($fp, "\n");

 

This line of code is supposed to create a new line after each record but it does not. It mix up all the records.

 

Many thanks for your help

Link to comment
Share on other sites

Hello, and welcome to the forums.

Most likely your problem is being caused because your text editor recognizes newlines as either "\r" or "\r\n", not "\n".

As such, you need to either change the newline you're using in your PHP code, or (the easier solution) is that you need to change the settings in your text editor to view "\n" as a newline.

Link to comment
Share on other sites

 Share

×
×
  • Create New...