Execution of HTML as PHP Print

  • top shared hosting, cheap web hosting, email services, email, best dedicated server host, shared web hosting, dedicated host server, domain hosting, cheap dedicated server hosting, ecommerce web hosting, email hosting, dedicated server web hosting, email address
  • 0

To be able to handle php script in .html file , you need to add the following in the .htaccess file:

AddType application/x-httpd-php5.html

To check that the setup works you need to create the following .html file and add the following php code in it:

<html>
<head> </ head>
<body>
<? php echo "Hello world!";?>
</ body>
</ html>

Save the file named test.html and upload it to your web hosting account.

When writing the address http://yourdomain/test.html in the browser you should see the message Hello World!


Was this answer helpful?

« Back