0

When I try to load a php inside an html page, somepage.html ... It brings up a download box.

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

Those were generated in my cpanel but still it shows a download box instead of the code.

What do I do?

Also additional information:

Apache version  2.2.17
PHP version     5.3.4

1 Answer 1

1

Not sure, but you can try:

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

Took it from this blog post.

EDIT: Just saw that you're using PHP inside .html files. Can't you just change the extension?

1
  • I'm doing cookie checks in some html pages I can't change the extension :\ I mean I could but I really don't want to. :| I just know it's possible I did it on my last host but this one seems different. I really don't know whats wrong. :|
    – Kyle
    Feb 17, 2011 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.