How Could I include php in html files ? i have html files. i want to add header and footer to it. i try : <?PHP include("header.php"); ?> PHP: but it didnot work.
You would need to set HTML pages to be parsed by the PHP parser, then you would include the PHP code within the HTML as you would normally: <? phpcode; ?>
I had a hard time with this until I realized that I had to phrase it like this because I am using php 5: AddHandler application/x-httpd-php5 .html. I almost gave up, I hope this helps someone.