php not working on wamp

Discussion in 'Site & Server Administration' started by vicky123, Nov 20, 2008.

  1. #1
    hi i am new to php and i am using wamp for learning php but i have made a file
    <?php

    echo "hello world";
    ?>

    but it is not working the text is not displayed i have also used the php info statement but nothing seems to happen i have also enabled the short open tags please help me i want this working wamp worked fine in the office pc and i made a couple of scripts in it but not working in my home pc.
     
    vicky123, Nov 20, 2008 IP
  2. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #2
    Please don't be insulted as you said you were new.

    Did you save the file as file.php and save it in the proper directory? For xampp that is in a folder you create under the htdocs folder. I think maybe wamp uses www.

    Also you have to start apache in order to view php pages in a browser.

    There is nothing wrong with your script except mabe that you saved it as a txt file.
     
    Colbyt, Nov 20, 2008 IP