gary mailer wrote:
My httd.conf file has the follwing code
LoadModule php4_module g:/php4/sapi/php4apache.dll
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Hey Gary,
The answer to your problem lies in the information above, or rather what's not in the information above🙂
Add the following line:
AddType application/x-http-php .html .htm
restart Apache, and all HTML files will be magically parsed🙂 You can use the AddType directive to make PHP read whatever extension you wish. Regarding the comments about using short tags (ie. <? ?>), you must have the shot_open_tag directive in php.ini set equal to on to use that tag format. I think it's enabled by default. Although the polically correct method is to use full tags, it doesn't really matter. If you want to be HTML 4.0 compliant you can also use:
<script language = "php">
// some code
</script>
This has advantages since some of the dodgier, but most common GUI editors (cough, cough.... Frontpage), will play ducks and drakes with code embedded using the normal php tags. Hope this helps!!!
Cheers,
Geoff A. Virgo