Jump to content

Odd Error with using php include in html pages


fastoffice

Recommended Posts

hello,

I am getting a weird error on my site. fastoffice.com

 

If I use the address http://fastoffice.com all my pages work correctly, but if I use www.fastoffice.com, some of my .html pages (i.e. faq.html, officechairs.html) ask me to download the page instead of loading it as usual, while other .html pages do not give this unusual error. All .php files execute fine though.

 

I've not seen this before. I thought it might be my tweaking of the .htaccess file yesterday to accommodate a php include in .html pages so I rolled it back to a previous version but the error is still there. I even did a full directory backup and that didn't fix it.

 

any suggestions?

Thanks,

Kevin

if you didn't set .html files as a php extension in your php ini or htaccess, then html is just what it is.. an HTML file, in order to use PHP in these files, just change your extensions to .php and they'll work fine

 

 

add this to your .htaccess file if you're shared hosting or don't understand php ini

 

AddType application/x-httpd-php .html .htm

 

that should fix your "php in html" problem

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.