trailing blank line in a text file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have weird problem. I have some php code that existed on the other
machine and worked fine. And it behaves fine now as well as long as I do
not edit the text files.

When I edit the file, the editor appears to append a trailing blank line.
For example, when I do wc -l file.txt it gives me 18 lines. But when I do
an fread on the same file with php code and store each line into an array,
and later display count of the array elements, it gives me 19 lines.
Because of that my web pages do not display correctly.

I have checked the code and everything is correct. It only happens when I
edit the existing files.

Can anybody tell me what is going on? Why do I get the trailing blank line.

Thank you.

Olga



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux