Page 1 of 1

First PHP Test

Posted: Tue Aug 16, 2011 12:25 am
by slipstreamer
Hi,

I am a newbie to PHP but not to programming.
I've just downloaded and installed WAMP 2 and I made a basic .php file under
the htdocs directory of Apache which is called test.php and has the following code in it:

Code: Select all

<html>

  <head>
  <title> PHP Test </title>
  </head>

  <body>

  <p> this is an HTML LINE </p>

  <?php
    phpinfo();
  ?>

 </body>

</html>


I don't see any PHP Ingo output. WAMP saysy it is running OK.

Can you help please ?

Thank you,
Colin

Re: First PHP Test

Posted: Tue Aug 16, 2011 1:33 am
by Christopher
What do you see? Is PHP code displayed or does it show nothing where the PHP code is?

Re: First PHP Test

Posted: Tue Aug 16, 2011 1:42 am
by slipstreamer
It shows

this is an HTML LINE

and nothing else.

Re: First PHP Test

Posted: Tue Aug 16, 2011 12:50 pm
by Christopher
What if you put only this in a PHP file:

Code: Select all

<?php
phpinfo();
* phpinfo() outputs a full page