By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,722 Members | 1,874 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,722 IT Pros & Developers. It's quick & easy.

Should remove comments from a file before hosting?

hsriat
Expert 100+
P: 1,654
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?
Feb 23 '08 #1
Share this Question
Share on Google+
8 Replies


NeoPa
Expert Mod 15k+
P: 31,541
The Cafe is for NON-technical questions.
As this seems to be PHP related, I've moved it to the PHP forum.
Feb 23 '08 #2

Markus
Expert 5K+
P: 6,050
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!
Feb 23 '08 #3

hsriat
Expert 100+
P: 1,654
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. :)
Feb 23 '08 #4

Markus
Expert 5K+
P: 6,050
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.
Feb 23 '08 #5

hsriat
Expert 100+
P: 1,654
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.
Feb 23 '08 #6

NeoPa
Expert Mod 15k+
P: 31,541
...
@ 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.
Feb 23 '08 #7

ronverdonk
Expert 2.5K+
P: 4,258
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
Feb 23 '08 #8

hsriat
Expert 100+
P: 1,654
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....... :)
Feb 24 '08 #9

Post your reply

Sign in to post your reply or Sign up for a free account.