homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

html pages with .php include files
does it work?

 12:37 am on Nov 12, 2004 (gmt 0)

i am curious about this, can i put a .php include file inside a .html page? would the .html page be able to read the .php file? I am thinking no, it's only the other way around right? thanks



 1:44 am on Nov 12, 2004 (gmt 0)

I think it all depends on how your server is set up.
What you have to do is set the server to parse .html files just like .php files.


 11:37 am on Nov 12, 2004 (gmt 0)

Exactly. Hiding PHP [php.net] describes how to do so if you are using Apache as your http server.


 3:36 pm on Nov 12, 2004 (gmt 0)


Does this type of set up eat a lot of server resouces?
I mean some of your pages might just be plain HTML with no PHP included, but this sever will still parse it as php. is this a waste, or will it slow things down?


 3:48 pm on Nov 12, 2004 (gmt 0)

There will be a slight performance hit because all HTML will be parsed through the PHP engine. But if you can tell the difference I would be surprised.

I have one entire site setup running backend database hits on every page served up. Each and every page! They all get parsed by PHP, plus database reads! It is so fast you can't tell the difference. The end user thinks it's static html. Oh, there you go, along with the PHP parsing and database connections/queries, I'm running the request through mod_rewrite each time too. And you would never know it unless I told you ;)


 4:55 pm on Nov 12, 2004 (gmt 0)

Great coopster


 5:17 pm on Nov 12, 2004 (gmt 0)

cool, thanks everyone for your answers.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved