PDA

View Full Version : fwrite problem - automatic


adrien84
06-30-2004, 09:48 AM
Hello, please pardon my english, as it isn't my native language.

in a php file, I want to write some data into a text file.
I use fwrite (or fputs), and want to write for example:

hello;wordone;wordtwo;wordthree;wordfour;five;six;seven;eight;nine;ten

I want to write it twice, and my file should be the following:

hello;wordone;wordtwo;wordthree;wordfour;five;six;seven;eight;nine;ten
hello;wordone;wordtwo;wordthree;wordfour;five;six;seven;eight;nine;ten

But instead, the file looks like this:

hello;wordone;wordtwo;wordthree;wordfour;five
;six;seven;eight;nine;ten
hello;wordone;wordtwo;wordthree;wordfour;five
;six;seven;eight;nine;ten

I do not understand why it automatically goes to the next line. (it is not because of the text editor, as I opened it with different text editors.

Thanks in advance for your help.

raf
06-30-2004, 09:53 AM
Welcome here!

Can you post the code youused to write to the textfile so we can see what goes on?