PHP in htm problem

Posted by HWLJr, 03-04-2010, 07:59 PM
I have a Blue Quartz server which seems to run htm, html and php pages just fine. I can call a test.php report up no problem too from domains and subs. However, I cannot embed a php statement in an htm page. example from an htm page:
March 22, 2010
this does not work - no Hello shows up. I might add that when I added the code the first time, it worked for about 5 minutes! Thank you for any advice.

Posted by RS Shamil, 03-04-2010, 08:11 PM
Try: Notice the semicolon, delimiter.

Posted by _mediapig_, 03-04-2010, 08:21 PM
I believe if memory serves me correctly that the Page would have to be saved as a .php file for the php to be parsed by the php server. Unless you have configured php to parse .htm and .html files, which I dont think it is set to do by default.

Posted by HWLJr, 03-04-2010, 09:05 PM
and tried this but this did not work - pardon my lack of knowledge - how/where can I configure the php to parse as you suggest? Thanks

Posted by jweeb, 03-04-2010, 09:11 PM
Did you save the file as a php file?

Posted by FrankLaszlo, 03-04-2010, 09:15 PM
Most hosting companies are only setup to parse files ending with the '.php' extension through the php interpreter. You can override this default behavior by adding something like this to the sites .htaccess: This may or may not work depending on how your server is configured.

Posted by HWLJr, 03-04-2010, 09:16 PM
That works! I'll continue testing... thank you

Posted by HWLJr, 03-04-2010, 09:19 PM
I'll try that too as I have none now. Thanks

هل استفدت من هذا الجواب؟

 أطبع هذا المقال

اقرأ أيضا

external pop email

Posted by dotflyer, 03-28-2008, 03:19 AMOne of my customer using google apps for his domain. He...

PHP or ASP.NET

Posted by 3DProf4online, 08-27-2008, 07:56 AMHaving found out that Linux hosting is ordered for...

(C++)Displaying a char array in a CLI form

Posted by Die4Ever, 01-11-2008, 05:15 PMIt's my first time using Windows Forms, and I'm trying to...

Sprynex ?

Posted by zshelton, 09-04-2002, 12:27 AMDoes anyone here have any experience with Sprynex? good...

Documenting downtime

Posted by yosmc, 05-04-2007, 10:30 AMI'm having a bit of a quabble with my current host because...