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

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

Disabled functions in PHP

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

suPHP

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

Disable Php Error

1. Create php.ini in the desired folder 2. Insert this line of code display_errors = Off 3....