Php Code on html pages
Posted: Tue Mar 20, 2012 8:47 am
How do I get my php code to run on html pages without a .php extension? I tried this but it doesn't work:
CODE for index.html
<html><head></head><body>
<?php include("test.php"); ?>
</body></html>
------------------------------------------------------------
test.php in same folder consists of the following text and nothing else: THIS IS DISPLAYING BECAUSE PHP IS WORKING!
------------------------------------------------------------
CODE for .htaccess in same folder:
AddType application/x-httpd-php .html .htm
------------------------------------------------------------
Firefox gives me: Download Error
C:\......Local\Temp\index-11.html could not be opened, beacuase the associated helper application does not exist. Change the association in your preferences.
Internet Explorer just gives me a blank page.
Thanks,
Al
CODE for index.html
<html><head></head><body>
<?php include("test.php"); ?>
</body></html>
------------------------------------------------------------
test.php in same folder consists of the following text and nothing else: THIS IS DISPLAYING BECAUSE PHP IS WORKING!
------------------------------------------------------------
CODE for .htaccess in same folder:
AddType application/x-httpd-php .html .htm
------------------------------------------------------------
Firefox gives me: Download Error
C:\......Local\Temp\index-11.html could not be opened, beacuase the associated helper application does not exist. Change the association in your preferences.
Internet Explorer just gives me a blank page.
Thanks,
Al