njschwartz wrote:Hi all! I am new to this so perhaps this is a dumb question but I can't find the answer anywhere. I am running Windows Server 2k3 with IIS and PHP5. My issue is after installing PHP it seems to work since phpinfo() works. You can see it at www.nateandstephie.com/test.php What I don't get is nothing else seems to work. I made a simple hello world at www.nateandstephie.com/hello.php and it doesn't show the text. I am at a loss. When I view page source everything looks correct so I don't understand why it isn't working right. Any guidance in the right direction would be wonderful. Thank you!
Nate
your source code
<HTML>
<HEAD>
<TITLE> Hello World in PHP </TITLE>
</HEAD>
<BODY>
<?
// Hello world in PHP
print("Hello World");
?>
</BODY>
</HTML>
Change to the following
<?php
echo("<HTML>");
echo("<HEAD>");
echo("<TITLE> Hello World in PHP </TITLE>");
echo("</HEAD>");
echo("<BODY>");
// Hello world in PHP
print("Hello World");
echo("</BODY>");
echo("</HTML>");
?>
you can also echo the Hello World instead of print.
echo("Hello World");
I have tested your code on my local machine and it works only because I have short tags enabled.
Which means I can use either <? ?> or <?php ?>
Im betting that your server handles only <?php ?>
I really prefer and recommend you use the following tags <?php ?>