代码不整齐,下载文件时乱七八糟?
有时,当我下载文件时,它们看起来一团糟: 例如。我已经:
<?php get_header(); ?>
<div class="art-contentLayout">
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
<div class="art-content">
.
.
.
但是当我下载它时,它看起来:
<?php get_header(); ?><div class="art-contentLayout"><?php include (TEMPLATEPATH . /sidebar1.php'); ?><div class="art-content">...
有时因此我收到 php 错误。 为什么会发生这种情况?我怎样才能避免此类情况的发生? 谢谢
PS:操作系统:Win 7,FTP客户端:Filezilla,编辑器:Notepad ++,在编辑器中检查了文本换行,我说有时会发生这种情况
sometimes when i download files they look a horrible mess:
eg. i've:
<?php get_header(); ?>
<div class="art-contentLayout">
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
<div class="art-content">
.
.
.
but when i download it looks:
<?php get_header(); ?><div class="art-contentLayout"><?php include (TEMPLATEPATH . /sidebar1.php'); ?><div class="art-content">...
and sometimes because of this i get php errors.
why this happens? how can i avoid of such occurences?
Thanks
PS: OS: Win 7, FTPclient: Filezilla, Editor: Notepad++, text wrapping is checked in editor, and i said SOMETIMES it happens
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
阅读有关换行符的历史(主要是 LF 与 CRLF):http://en.wikipedia.org /wiki/Newline
在您的情况下,您只需要找到一个更好的文本编辑器即可使用,它将保留行结尾并正确显示文件。
Read this about the history of newline characters (mostly LF vs. CRLF): http://en.wikipedia.org/wiki/Newline
In your case, you just need to find a better text editor to use that will preserve the line endings and show you the file properly.