Whitespace problem when two people opening files

Discussion in 'PHP' started by webtracker, Jan 23, 2007.

  1. #1
    A friend and I are both working with the same PHP files. One of us makes changes to the code, ftp's the files to a web server, where the other downloads the same file, makes changes and ftp's it back to the server.

    We've been noticing that, when we're doing this, we get an additional line break (hard return) for each line that exists in the file. If we have 50 lines of compacted code (meaning no line spacing) and go through this process 1 time we end up with 100 lines. If we run through it again we get 200 lines, etc...

    We are both using Dreamweaver right out of the box...same ver (6.0 MX), same settings.

    If one of us works with the file and the other doesn't touch it there are no problems. Either one of us can grab the file, upload it, download it, re work it, and repeat the process without any problems but when the two of us work on it we get the same problem.

    Does anyone know what's giong on?
     
    webtracker, Jan 23, 2007 IP
  2. smatts9

    smatts9 Active Member

    Messages:
    1,089
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    88
    #2
    Try testing out different text programs like Notepad, Wordpad, etc. and see if you problem is still occurring, it may just be Dreamweaver. Ive only ever used Wordpad, so I have no experience with Dreamweaver.
     
    smatts9, Jan 23, 2007 IP
  3. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I know you said that you're using the same settings, but are you using the same operating systems? It sounds like one of you is set up to use Windows line ends while the other is using UNIX line ends.

    Windows line ends are \r\n while UNIX only uses \n. When expecting UNIX line ends, the Windows ones will get interpreted as two line ends, essentially...
     
    TwistMyArm, Jan 24, 2007 IP
  4. bobby9101

    bobby9101 Peon

    Messages:
    3,292
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    0
    #4
    can I rant here? [rant]dreaweaver sucks :D[/rant]
    Check out a free text editing program such as notepad, wordpad, or notepad2
     
    bobby9101, Jan 24, 2007 IP