Unwanted ftp surprises
Sometimes, when I upload files to ftp, and then download them, I face with some "unwanted tricks" inside gotten files.
Initial file:
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Works</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Docs</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Forums</a></li>
</ul>
2 examples:
1) Unwanted blank lines.
When I get files back, code becomes look like:
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Works</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Docs</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">Forums&开发者_如何学Pythonlt;/a></li>
</ul>
2) Tabulation clearing:
Code transforms to:
<ul><li><a href="#">Home</a></li><li><a href="#">Works</a></li><li><a href="#">About</a></li><li><a href="#">Docs</a></li><li><a href="#">Blog</a></li><li><a href="#">Forums</a></li></ul>
Why it happens and how to to beat these surprises?
Make sure your transfer type is correct. In other words, ASCII or auto.
精彩评论