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

Premature end of script headers

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

suPHP

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

Disabled functions in PHP

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

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

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

Disable Php Error

1. Create php.ini in the desired folder 2. Insert this display_errors = Off 3. Upload to web....