You didn't mention what was happening exactly. Like is there an error or what?
Make sure you have set the httpd.conf file for Apache to recognize php extensions. Examples:
To setup Apache as CGI:
ScriptAlias /php/ "c:/PHP/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/PHP/php-cgi.exe -C C:\PHP"
To setup Apache as a module (recommended):
LoadModule php5_module "C:/PHP/php5apache.dll"
AddType application/x-httpd-php .php .phtml
Restart the server every time you make a change to httpd.conf or php.ini.
The phpinfo() function is built into PHP and will work if everything is setup right. Here's an output example of what phpinfo() displays (it will be different for your setup):
http://clust02.powweb.com/phpinfo.php
hth.