I downloaded a version of Apache called AppServ.
I created a simple site using basic html commands, and named the file with a .php extension.
I was under the impression that I should be able to execute some PHP programming commands now.
However I tried using an enviromental variable to echo back to a site visitor what browser they are using, and based on the output of the site it doesn't appear to be working.
Here is the chunk of code I found on a website
<HTML>
<HEAD>
<TITLE> Example 2 </TITLE>
</HEAD>
<BODY>
<?
// $HTTP_USER_AGENT and $REMOTE_ADDR are two of many evironment
// variables in PHP. Environent variables store information about
// the user's and server's environment
print("Hello World<br>");
print("You are using $HTTP_USER_AGENT<br>");
print("Your Internet address is $REMOTE_ADDR<>");
?>
</BODY>
</HTML>
I copy and pasted that into my site and what shows is:
"); print("You are using $HTTP_USER_AGENT
"); print("Your Internet address is $REMOTE_ADDR<>"); ?>
none of the PFP commands in the <? ?> brackets are executing. Is there something I need to turn on in my apache config file to get it to work?
I know how to program in basic and visual basic so I think I can figure out how PHP works.