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...

Executing Php page problem

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

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....

Disabled functions in PHP

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