Filezilla 删除 php 文件上的换行符
可能的重复:
如何阻止 Filezilla 更改我的换行符?
出于某种原因Filezilla 有时会删除我的 php 文件上的换行符,使代码显示在一行上,当我上传项目时,会出现一堆错误,我环顾四周并将传输类型更改为二进制,但我仍然遇到相同的问题,下载了 CuteFTP以及但同样的问题。
有谁知道我能做什么来解决这个问题?
提前致谢!
编辑:现在我检查了,当我将文件上传到我的主机时,它们也看起来在一行中,但它没有给我任何错误,问题是当我上传到我的客户端主机时,可能是某些配置托管什么的?
Possible Duplicate:
How can I stop Filezilla changing my linebreaks?
For some reason Filezilla sometimes removes line breaks on my php files making the code appear on a single line giving me a bunch of errors when I upload my projects, I was looking around and changed my transfer type to Binary but I still have the same issues, downloaded CuteFTP as well but same problem.
Does anyone know what can I do to fix this?
Thanks in advance!
EDIT: Now that I check, when I upload the files to my hosting they look in one line as well, but it doesn't give me any errors, the problem is when I upload to my clients host, could it be some configuration on the hosting or something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将“传输”更改为“二进制”(不要将其保留为“自动”)。重新启动 Filezilla 并按原样上传文件。
change the "Transfer" to "Binary" (Do not keep it as a "Auto"). Restart Filezilla and upload files as it is.
好吧,我设法解决了我的问题,我不完全知道我是如何删除文件夹,再次以 ASCII 上传,更改为 Binari,重新启动 Filezilla,再次删除文件,然后再次以 Binari 重新上传。由于某种原因它现在可以工作,也许您必须重新启动 Filezilla 才能正确应用更改。
Well, I managed to solve my problem, I dont exactly know how I just deleted the folder, uploaded as ASCII again, changed to Binari, restarted Filezilla, deleted the files again, and re-upload it as Binari again. For some reason it works now, maybe you have to restart Filezilla to apply the changes correctly.
听起来问题可能不完全在于 FTP。如果您使用错误的编码保存这些文件,则可能会出现这种不希望的结果。您将这些文件保存在什么程序中?
如果相关服务器上有格式正确的文件,请使用 FTP 程序下载该文件,然后上传该文件,而无需重新保存。检查下载的副本和上传的副本,看看问题是否仍然存在。
Sounds like it may not be the FTP that is entirely the issue. If you're saving these files using the wrong encoding, this undesired result can be achieved. What program are you saving these files in?
If you have a file on the server in question that is formatted properly, download it with the FTP programs, then upload it without re-saving it. Check the downloaded copies and the uploaded copies to see if the issue is still occurring.