Knowledgebase

Executing PHP code within an HTML document

Problem:

Executing php code within a HTML document

Solution:

Deprecated Executing php code within a HTML document is easy. 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:

Code:
  <?php
    echo "hello world"
  ?>


Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
PHP Version (Views: 37189)
Allow_url_include (Views: 12874)
Cron Jobs with PHP Files (Views: 48653)
Error Pages 2 (Views: 35698)

Client Login

Email

Password

Remember Me