0

After downloading a file(.php) from ftp server it is without line breaks and syntax fluency is destroyed. unfortunately i haven't backuped particular file. How to restore line breaks ?

  • 1
    Are you sure the line breaks are actually destroyed? It could be the wrong kind: systems can use either `\r`, `\n`, or `\r\n`. If it's an actual PHP file with code, throw it into an IDE that can format the code. – aynber Mar 29 '17 at 17:02
  • Another option is to simply use a web-based PHP beautifier. See: http://www.cleancss.com/php-beautify/ – Timothy Wood Mar 29 '17 at 17:10
  • @aynber thanks for a reply ! I am using Coda 2 as a code reader, and I open file instantly after downloading it from FTP. to be more specified its product.tpl file from prestashop. And this file is still minified after opening with IDE. What to do :( ? – liudasbarcauskas Mar 29 '17 at 17:10
  • It looks like Coda2 does not do code formatting. There may be a plugin for it (check [here](http://stackoverflow.com/questions/12417337/block-code-formatting-in-coda-2) about a plugin), you can use a different program, or as Timothy said, you can use a web-based formatter. – aynber Mar 29 '17 at 17:14
  • Thank you guys ! coda and cleancss.con didnt helped, but i installed brackets IDE and a beautify plugin and everything fixed. +rep – liudasbarcauskas Mar 29 '17 at 17:32

0 Answers0