Page 1 of 1

parsing php in .html files

PostPosted: 25. March 2010 10:28
by viraynaud
Hi,

First, sorry for my English because I'm French...
For my website I use a CMS working with html skeletons. I can explain if the word "skeleton" is wrong... So the page .php loads a skeleton, and it's also possible to write PHP in .html files. It works online but not on my PC with xampp... I read ( here : http://www.webmasterworld.com/php/3432766.htm) that there was something to edit in httpd.conf to parse PHP in htlml files but it doesn't works, I think I haven't done the right thing...

what sould I modify to parse php in html files please? thanks!

Re: parsing php in .html files

PostPosted: 25. March 2010 11:07
by Nobbie
I think you problem is NOT the HTML file, but that you use short tags "<?" instead of full tags "<?php". Remember: also "<?=$variable?>" is a short tag.

Either change your tags into long tags or edit php.ini and set "short_open_tag" to 1 (or "On", see php.ini). And restart Apache after changing php.ini

Re: parsing php in .html files

PostPosted: 25. March 2010 11:13
by viraynaud
well, I've verified that... but I both set short_open_tag to yes, and always use "<?php", never "<?" .... thanks for your answer!