Please Login or Register

Executing php code within a HTML document

Executing php code within a HTML document is easy. Simply add this line to your main .htaccess file.

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

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

<?php
echo "Hello World";
?>

Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
Upload_Max_Filesize (Views: 5968)

awards_sum