I have a weird issue where my PHP files have lost their line breaks and appear to have weird box/rectangle shaped characters in them. I have no clue how to fix them and they are interfering with my website.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What editor are you using? That is a symptom of trying to edit Unix format files in MS notepad (amongst other combinations).
Your files have most likely been converted by an FTP transaction of uploading them to the remote server (because the client correctly used
TYPE A) and not converted back when you retrieved them (because it incorrectly usedTYPE I).Either get a better editor (like Notepad++ or EditPadPro) or force your FTP client into ASCII mode (
TYPE A).FYI, on *nix a line ending character is LF only (
\n), on Windoze it is CRLF (\r\n) and on Mac it is CR only (\r).