php inside a html file

php inside a html file

Posted by: yakk0dotorg
Posted on: 2005-10-11 21:13:00

I am in the process of moving a site to dreamhost that I currently host on a server at home. The site uses php inside .html files, but this doesn't seem to work when the files move to dreamhost. Is there anything I can do to get this to work?

Re: php inside a html file

Posted by: silkrooster
Posted on: 2005-10-12 14:42:00

Check and see if the php is using one of the disabled functions like fopen. If it is you may either rewrite the program or upload your own version of php with the correct settings in php.ini file.
Silk

Re: php inside a html file

Posted by: kchrist
Posted on: 2005-10-12 14:51:00

Are you just talking about parsing .html files as if they were named .php? No problem. Add one line to an .htaccess file in the root directory of your site:

AddHandler application/x-httpd-php .html

Re: php inside a html file

Posted by: ilion
Posted on: 2005-10-16 20:00:00

Just out of curiosity is there a reason you want to use an html extension and not a php extension?

Re: php inside a html file

Posted by: yakk0dotorg
Posted on: 2005-10-16 21:48:00

i'm moving a site over, and it's in html with some PHP stuff at points, like where I'd include something.

Re: php inside a html file

Posted by: yakk0dotorg
Posted on: 2005-10-16 21:50:00

that did it, thanks! I didn't know how to do that since we can't edit the httpd.conf.

Tags: html fileshtml filedreamhostphpmoving