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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.