Using PHP in .html files

If you want to use .html or .htm files but still have it parsed by PHP then you'll need to add a line in your .htaccess file in the directory that the .html file resides in.

Here's the line to add...

AddHandler application/x-httpd-php5 .html .htm

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

PHP v4

PHP v4 was officially announced as reaching it's End-Of-Life in July 2007. No more PHP v4...

Error 403 - Forbidden

If you're getting error 403 - Forbidden running your PHP script, the chances are that it's...

Error 500 - Internal Server Error

Usually you get this error when the script you're trying to run isn't owned by yourself or it's...

Use of php_flag or php_value in .htaccess

If you're on a server with SUPHP enabled, some PHP options in .htaccess files, such as php_flag...

PHP Tutorials

We came across these tutorials on PHP and have to say we're impressed! If you want to pick up...