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?
The line break can be removed from string by using str_replace() function.The str_replace() function is an inbuilt function in PHP which is used to replace all the occurrences of the search string or array of search strings by replacement string or array of replacement strings in the given string or array respectively.
Yes, take note, trim () leaves all line breaks in-between as-it-is. Lastly, this should be pretty self-explanatory. To remove HTML line breaks ( <br> or <br/> ), we do the same old “replace all <br><br/> with an empty string”.
To only remove the leading and trailing line breaks, use the trim () function instead. Yes, take note, trim () leaves all line breaks in-between as-it-is. Lastly, this should be pretty self-explanatory.
The developers of FileZilla appear to have a pretty exclusive opinion on how unknown files should be transferred by default. The bug report dwells since 2008. Of course, it may help if more people jump in and request a fix for this flaw.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With