mmesarina Posted May 25, 2007 Share Posted May 25, 2007 Hi, I am using windows, Apache2.2 and PHP 5.1. I have no problems accessing a php or html page using the http path to the files, for example executing , http://localhost:8080/example.html , whic has php code inside But what i want to be able to do is to opent the "example.html " with my IE browser and get the right result. However, when I do this , I get a blank page. I did put the following line in my httpd.conf to enable php code to be executed inside html pages: AddType application/x-httpd-php .php .html I aslo tried the following line: AddHandler application/x-httpd-php .htm .html Yet, none of this helped. I don't know where else to look for to get this working. Does anyone know the answer? -malena Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted May 26, 2007 Share Posted May 26, 2007 You should just add the .html file extension to the AddType not the AddHandler When you added the .html extension to the AddType you did restart Apache? Also what type of PHP tag are you using in example.html? IS it <?php ?>, or <? ?> or something else? Make sure you use the full tags, eg <?php ?>, <?php echo "blah"; ?> rather than the short hand versions <? ?> or <?= ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.