HTML files not being parsed for PHP
Posted by: Peter (---.jetstream.xtra.co.nz)
Date: February 16, 2006 01:21AM

Hi,

I have been using WAMP succesfully for a few months. My problem is yesterday WAMP stopped parsing files with extension .html for PHP code.

For example, if I have a file called mypage.php cotaing this code
<?
echo 'hello'
?>

Then I enter this URL in my browser [localhost]
The result is I see "hello" in my browser..

But if I rename the file from mypage.php to mypage.html the browser displays a blank screen. if I view the source I just see the above php code.

I have this line in my httpd.conf file which previously seemed to make files with html expension get parsed for php code:
AddType application/x-httpd-php .html

Does anyone know why files ending .html are no longer being parsed for php? I was wondering whether WAMP or Windows has downloaded an auto update that has caused it.

Thanks

Options: ReplyQuote
Re: HTML files not being parsed for PHP
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: February 16, 2006 07:44AM

dont use short ASP style tags:

<?
echo 'hello'
?>

Use:

<?php
echo 'hello';
?>

Options: ReplyQuote


Sorry, only registered users may post in this forum.