0

Consider the following:

  • Zip up a folder, upload to server
  • unzip on server using 'unzip archive.zip'
  • Download any PHP file from that folder
  • Extra line breaks appear where unwanted

Any ideas why this happens or how to "undo it"? I have tried to do a "find and replace" but that ends up basically minifying the entire file onto "1 line", which is not wanted either...

Examine the attached image here enter image description here

Christian Žagarskas
  • 1,068
  • 10
  • 20

1 Answers1

-1

For the sake of posterity: I found that I was able to use this tactic: https://pixelflips.com/blog/removing-line-breaks-in-dreamweaver

  • Open the Find/Replace box (CMD+F / CTRL+F)
  • In the Find enter: [\r\n]{2,}
  • In the Replace enter: \n
  • Check the box "Use regular expression" and un-check any other boxes.
  • The hit "Replace All"

By using Adobe Dreamweaver, which works...

However, I am not going to make my own answer correct as I still wonder why this happens and want to prevent it if possible.

Christian Žagarskas
  • 1,068
  • 10
  • 20