I have wampserver installed but cant read php code.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Frank Mtu
    New Member
    • Apr 2014
    • 2

    I have wampserver installed but cant read php code.

    Code:
    <html>
    <head>
    <title>
      basic
    </title>
    </head>
    <body>
      <?php
           echo "Hello!";
       ?>
    </body>
    </html>
    I'm new to php and have written that basic code to che if all is set for my php practice but the problem is the browser doesnt display anything. Blank. Any help please.... i will be very thankful
    Last edited by Rabbit; Apr 15 '14, 03:20 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • techboy
    New Member
    • Apr 2014
    • 28

    #2
    Installin WAMP Server to run PHP:
    Goto www.wampserver.com and download WAMP Server.

    Just install it like other softwares by just clicking next next...

    Now go to START menu of windows and start wampserver.
    Generally, the path is Start -> WapmServer -> start WampServer

    Open your web browser and type http://localhost (or http://127.0.0.1 )
    If you see a default WampServer home page, you installation is success.

    Now put your php code in www folder in your wamp installation directory.
    Usually this is C:\wamp\www

    Now type http://localhost/filename.php in your browser. (where filename is your php file name)

    It will execute your php code.. Thats it...

    Comment

    • Frank Mtu
      New Member
      • Apr 2014
      • 2

      #3
      Thanks, techboy.
      the path is alright and it is "file:///C:/wamp/www/Practice/My.php".
      When i remove the php tags the browser displays "echo "Hello!";" but the moment i introduce the php tags, nothing comes up. What can i do to get it working?

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        That path is wrong. That is a file path and not a webserver path. Please follow the original instructions in post #2.

        Comment

        • techboy
          New Member
          • Apr 2014
          • 28

          #5
          You must keep your wampserver on and then type the localhost and the further steps.

          Comment

          Working...