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.

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

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

<?php
echo "Hello World";
?>

  • 0 کاربر این را مفید یافتند
آیا این پاسخ به شما کمک کرد؟

Related Articles

FastCGI for PHP

FastCGI for PHP FastCGI for PHP makes all your PHP applications run through mod_fcgid instead...

Protecting the php.ini file from being viewed

To prevent people to viewing your php.ini file via a browser a few lines need to be pasted into...

Configuring the PHP Environment With php.ini

The servers use a master php.ini file for all directories without a php.ini file in it. You will...

Upload_Max_Filesize

In a nutshell: Locate the php.ini file in the folder your upload script resides in. If none...

How do I enable PHP 5 for my PHP applications?

1. Login to your Control Panel and click the PHP Config icon. 2. Select PHP5 (Single php.ini)....