Jump to content

Recommended Posts

Posted

I'm using Windows with FileZilla and the text editor I use is Notepad++. Everytime I edit + upload that file, all the new lines are stripped off (at least for the .py files of mine). What is wrong?

Posted

You're probably using the wrong file endings. I would recommend using the LF line ending instead of the CRLF line ending.

Posted

FTP server will always convert new lines for you to the standard used in the system on the server if you send the file in txt mode. So in example if on Windows you use - as xaav wrote - CR+LF, then it will be converted to the LF on Unix system. And when you download it back again it is not converted back by your FTP client so you can notice that file has been change.

 

If you really want to you can avoid it and send all the files in binary mode (you can set it in FileZilla), so nothing will be converted, file will be sent as is. However as this makes no difference in example in PHP or pure HTML or even in .htaccess files, but for such language as Python it may be a problem if you'll use different new line characters (I'm not sure, though). So as xaav already wrote - you may want to use LF for new lines ("Unix format" in Notepad++ options).

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
×
×
  • Create New...