开发者

Filezilla removes line breaks on php files [duplicate]

开发者 https://www.devze.com 2023-02-01 18:11 出处:网络
This question already has answers here: Closed 10 years ago. Possible Duplicate: How can I stop Filezilla changing my linebreaks?
This question already has answers here: Closed 10 years ago.

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?


change the "Transfer" to "Binary" (Do not keep it as a "Auto"). Restart Filezilla and upload files as it is.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消