hiding code in php and php includes

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
chuck_samsonite
Forum Newbie
Posts: 1
Joined: Thu Aug 26, 2004 6:24 pm

hiding code in php and php includes

Post by chuck_samsonite »

hello.

I have a php question. I'm fairly new to php, but I used a php include to include my header info and when i checked the page source I could see the html code from the include. In coldfusion, all info between <cf> tags are not visible. I like this about coldfusion.

My question is....why is all the meta tags, head tags, etc showing when I include it. I dont want to (want to keep code clean in page source). Also, if there is a way to hide code in php I'd like to know, have had trouble finding it on the net.

thanks

chuck_samsonite
____________________________________
Lloyd: Oh yeah! It's right here, Samsonite! I was way off! I knew it started with an S though!
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

You can't hide code from 'view source', if it's sent to the browser then you can see it. If you don't want it sent to the browser then just comment the code out, but why would you comment out meta/head tags etc ?
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post by andre_c »

I'm curious, can you post an example page where cold fusion is hiding the header information?
Post Reply