Ben2998
Ben2998

Reputation: 3

PHP doesn't execute in IIS7

I've installed PHP on a Windows Server 2008 R2 machine using Microsoft's Web Platform Installer. Everything was going fine until I tried to run a simple Hello World in PHP.

Here's the source of the HelloWorld file:

<!DOCTYPE html>
<html lang="en">
<head>
<title>HelloW</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<p> Hello <? echo 'World!'; ?> </p>
</body>
</html>

For some reason, every script that I've made are not executing when I load the page in a web browser but I can execute any pages from the Wordpress package that I've installed using the same WPI installer without a hitch.

Both Wordpress and the HelloWorld files are in the same Website in IIS, both are encoded in UTF-8 and both have HTML5-compliant headers.

Can someone point me to where I've made a mistake?

Thanks

Upvotes: 0

Views: 92

Answers (1)

PlausibleSarge
PlausibleSarge

Reputation: 2223

some servers don't like <?. have you tried using <?php instead?

Upvotes: 1

Related Questions