Should remove comments from a file before hosting?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    Should remove comments from a file before hosting?

    I have a site in PHP, and I am going to host it with IX Web Hosting.

    Since I am doing it (uploading a website) for the first time, I was just wondering if its safe to leave the comments along with the PHP code in files?

    Is it safe enough?

    Any other precautions?
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32668

    #2
    The Cafe is for NON-technical questions.
    As this seems to be PHP related, I've moved it to the PHP forum.

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      Originally posted by hsriat
      I have a site in PHP, and I am going to host it with IX Web Hosting.

      Since I am doing it (uploading a website) for the first time, I was just wondering if its safe to leave the comments along with the PHP code in files?

      Is it safe enough?

      Any other precautions?
      Ofcourse it is..
      PHP is inaccesible to anyone that doesn't have access to your server.
      Imagine what state the net would be in if people did have access to anyones PHP code.
      Sheeeeesh!

      Yeh, don't worry about it - comment it as much as you can because, in 5 years when you come back to look at the code, you might've forgotten what the hell it's doing!

      Comment

      • hsriat
        Recognized Expert Top Contributor
        • Jan 2008
        • 1653

        #4
        Originally posted by markusn00b
        Ofcourse it is..
        PHP is inaccesible to anyone that doesn't have access to your server.
        Imagine what state the net would be in if people did have access to anyones PHP code.
        Sheeeeesh!

        Yeh, don't worry about it - comment it as much as you can because, in 5 years when you come back to look at the code, you might've forgotten what the hell it's doing!

        Thanks :)

        I was actually thinking about the people out there in the hosting company who have access to the server.

        But I guess I was worrying for no reason....!



        @ neoPa I thought the question was general. Someone using something other than PHP may need to know this.
        But, thanks, I got my answer here. :)

        Comment

        • Markus
          Recognized Expert Expert
          • Jun 2007
          • 6092

          #5
          Originally posted by hsriat
          Thanks :)

          I was actually thinking about the people out there in the hosting company who have access to the server.

          But I guess I was worrying for no reason....!



          @ neoPa I thought the question was general. Someone using something other than PHP may need to know this.
          But, thanks, I got my answer here. :)
          Well, they only have access to their own domains.. so don't worry about it.
          People higher up (ie, admins for the hosting company) might have access but they'd sure get fired for messing around.

          Comment

          • hsriat
            Recognized Expert Top Contributor
            • Jan 2008
            • 1653

            #6
            Originally posted by markusn00b
            Well, they only have access to their own domains.. so don't worry about it.
            People higher up (ie, admins for the hosting company) might have access but they'd sure get fired for messing around.

            Yeah, you are right I think.

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32668

              #7
              Originally posted by hsriat
              ...
              @ neoPa I thought the question was general. Someone using something other than PHP may need to know this.
              But, thanks, I got my answer here. :)
              Not a big problem, but the Cafe is for questions that aren't technical. Somewhere for members to relax.
              You possibly could have used the Misc Questions forum instead. As I say though, no big deal - it's here now.

              Comment

              • ronverdonk
                Recognized Expert Specialist
                • Jul 2006
                • 4259

                #8
                Whoever has access, it doesn't really matter. Removing the comments still leaves the code itself. And a clever PHP programmer does not need comments to find out how the script works. So just leave all comments in.

                Ronald

                Comment

                • hsriat
                  Recognized Expert Top Contributor
                  • Jan 2008
                  • 1653

                  #9
                  Originally posted by NeoPa
                  Not a big problem, but the Cafe is for questions that aren't technical. Somewhere for members to relax.
                  You possibly could have used the Misc Questions forum instead. As I say though, no big deal - it's here now.

                  Ok, I got it....... :)

                  Comment

                  Working...