PHP_FTP,windows,unix & line breaks (funtimes!)
Posted: Wed Mar 22, 2006 4:12 pm
Hey guys,
So here is my problem. I've written a nifty little script to ftp a bunch of files and directories to an ftp server of my choice. The only problem with it is that after I upload all of the files, the text files lose all of there line breaks and spacing. I have done some research and discovered that this is because the program that the text files were written on, (probably Dreamweaver) use the windows method of writing line breaks and not the unix method.
I have noticed that when I use FileZilla from my laptop this too also happens. Yet if i use Internet Explorer in FTP mode it does remove the line breaks after the upload.
So anyone got an idea about how to approach this? Should I make the programmer who wrote all these php scripts export them out of a dreamweaver in a specific format? Can i turn on some conversion option in php... I'm confused, any help would be appreciated. thank you.
Wh33t
So here is my problem. I've written a nifty little script to ftp a bunch of files and directories to an ftp server of my choice. The only problem with it is that after I upload all of the files, the text files lose all of there line breaks and spacing. I have done some research and discovered that this is because the program that the text files were written on, (probably Dreamweaver) use the windows method of writing line breaks and not the unix method.
I have noticed that when I use FileZilla from my laptop this too also happens. Yet if i use Internet Explorer in FTP mode it does remove the line breaks after the upload.
So anyone got an idea about how to approach this? Should I make the programmer who wrote all these php scripts export them out of a dreamweaver in a specific format? Can i turn on some conversion option in php... I'm confused, any help would be appreciated. thank you.
Wh33t