Executing php code within a HTML document

Simply add this line to your main .htaccess file.

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

Then, you can insert code into your .html pages like this:

echo "Hello World";
?>

  • 60 Users Found This Useful
Was this answer helpful?

Related Articles

Disabled functions in PHP

Php function below disabled for the shared hosting enviroment: Show_source System...

suPHP

777 – Do I need directories set to this? My install script says that I do. No, you do not...

suPHP, chmod, .htaccess, dan php.ini ( Dalam B.M)

Demi menjamin keselamatan sistem dan website setiap pelanggan, suPHP telah diinstall, dimana...

Executing Php page problem

If you encounter problem executing php pages, 1. Set the permission of the Php pages to 644 2....

Premature end of script headers

Premature end of script headers Check that your php file has open and close tags <?php...