putting a php page in a html page

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
Ichiro Sato
Forum Newbie
Posts: 1
Joined: Mon Jul 28, 2008 9:36 pm

putting a php page in a html page

Post by Ichiro Sato »

not sure if im posting in the right place but, im trying to put a php page inside a html page, is that possible?
flagday
Forum Newbie
Posts: 3
Joined: Mon Jul 28, 2008 11:49 pm

Re: putting a php page in a html page

Post by flagday »

You can place php code into an html file, but you need to make sure your .htaccess file allows for it on your server. Something like:

Code: Select all

AddType x-mapp-php5 .html .htm
AddType application/x-httpd-php .php .html
The html file will still need to have the standard html tags (html, body, etc.), or you could just use echo in php to generate those tags.

Hope that helps.
Post Reply