I was trying to include a php file into a file with the .html extension. Not with the .php extension.
DOESNT work:
http://www.pridenutrition.com/Test.html
DOES work:
http://www.hi-topswrigleyville.com/Test.html
The first is running on a Windows IIS based system and one is running on Unix.
Is this possible on a Windows IIS server? (i.e. Is there a fix to the one that DOESNT work.) Why does one work and not the other?
Here is my code (the same code was used on both servers):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<h1>
<?php echo '<p>Hello World</p>'; ?>
</h1>
</body>
</html>
include .php in .html Windows IIS server
Moderator: General Moderators
Not to be annoying, but I know nothing about what you just said. It would be cool if you could elaborate on what some of what you just said real quick just so I have an idea about what was meant. An answer exact answer to the code isnt needed, but I am just learning about all this server stuff. Like I said I know its annoying, but I am new to that end of things.
ok open the IIS MMC.
rt click on your web site, select properties, click the home directory tab, click configuration, click add, browse to your php.exe or your *isapi.dll, add the .html extension click ok.
if using isapi, you'll probably need to restart IIS, if not, you should be good to do.
Note: I've never tried this with the .html extension so I"m not sure what effect it will have as that extension is probably already mapped somewhere else.
rt click on your web site, select properties, click the home directory tab, click configuration, click add, browse to your php.exe or your *isapi.dll, add the .html extension click ok.
if using isapi, you'll probably need to restart IIS, if not, you should be good to do.
Note: I've never tried this with the .html extension so I"m not sure what effect it will have as that extension is probably already mapped somewhere else.