• GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 

    Executing php pages, how?

    So, absolute noob to php post here. How do you execute the actual php page? I created the simple php page and named it test.php

     

    <html>
    <head>
    <title>Untitled</title>
    </head>
    <body>
    <?php
    <?php echo '<p>Hello World</p>'; ?>

    ?>

    </body>
    </html>

    Loaded it into my directory and simply tried it out by adding it to the end of my url address as www.namehere.com/test.php and I get a blank page. My server is enabled to run php 5.4 but I think I am missing something very simple here. I also want to start using the php simple html dom parser but confused if I need to load a file from there to my directory here or not. Noob to php but good with html.

     

    Thanks

    2 REPLIES 2

    Hi @Palmer55555,

    Looking at your coding, you need to remove the HTML tags. I would also refer to this article for guidance. 

    KayJay - GoDaddy | Community Moderator
    24/7 support available at x.co/247support
    Helper V

    See it in my website.

     

    Change:

    <?php
    <?php echo '<p>Hello World</p>'; ?>
    ?>

    To:

    <?php echo '<p>Hello World</p>'; ?>

    You are wrapping the php tag inside of a php tag.

     

    Since PHP is often put inside of HTML and since they use different syntax, it is going to be really confusing for you. I hope you can find a good book to help you. You need to at least find good tutorials in the internet. However I understand that sometimes the basics are difficult to get past unless the tutorial is extremely basic. Hopefully this will help you start crawling at least.