-1

I am not able to run a php script on an html file, as the picture showed in the link, it always show error and nothing function in html file.

But I already have .htaccess configured in website root, and my dreamweaver have a php local server, and I set up my php by using xamppp. I have no idea why it won't work.

My .htaccess file:

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

AddType application/x-httpd-php5 .php5

AddType application/x-httpd-php5 .phps

AddType application/x-httpd-php5 .html .htm

Picture here

Blacktea
  • 79
  • 5

1 Answers1

0

Exactly what @arif_suhail_123 said. Rename the index.html file to index.php and the PHP code should be executed. Apache does not know the file contains PHP code if the .php file extension is not present.

w00tland
  • 69
  • 7