+ Reply to Thread
Results 1 to 6 of 6

Thread: Tutorial: PHP "Hello World"

  1. #1
    Void's Avatar
    Void is offline Programming Expert
    Join Date
    Jun 2006
    Posts
    410
    Rep Power
    23

    Tutorial: PHP "Hello World"

    PHP is a very easy language to learn and to use. In this simple tutorial I will show you how to create a PHP script that display's "Hello World".

    Lets Start
    1) First open notepad
    2) Add this line to your the top:

    Code:
    <?php
    This line lets the web server know that you are executing PHP and to execute this before displaying the HTML.

    3) Next we will use the Echo function to display our text, Hello World. Alternativly you could use the Print function as well.

    Add this below <?php:

    Code:
    echo "Hello World!"
    4) To finish our script we need to tell the server that we have reached the end of our PHP execution code. Add this line:

    Code:
    ?> 
    5) Save your file as hello.php and upload it to your webserver. Goto your website url (http://www.yourwebsite.com) and add /hello.php (http://www.yourwebsite.com/hello.php and you should see:

    Hello World!

    I've attached the sample file.
    Attached Files Attached Files
    Void

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101
    Well nice work! I dont know alot of PHP so I will see and make all your tuts, if you post more! Im interested in learning more PHP!

  4. #3
    Nightracer's Avatar
    Nightracer is offline Programmer
    Join Date
    Jun 2006
    Posts
    131
    Rep Power
    0
    There are also other methods of saying the same thing.

  5. #4
    DevilsCharm's Avatar
    DevilsCharm is offline Programming God
    Join Date
    Jul 2006
    Posts
    884
    Rep Power
    0
    Yes, but why is it so big? Shouldn't it be smaller?

  6. #5
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101
    If you are refering to the BIG Hello Word, I dont think that he did that in php, he just did that as an ending of the tutorial!

  7. #6
    kiddies is offline Programmer
    Join Date
    May 2009
    Posts
    129
    Rep Power
    0

    Re: Tutorial: PHP "Hello World"

    a simple example for php dude...but nice...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. INFECTION "Arcophage" Programmer needed for tutorial
    By Asyranok in forum Services for Buy/Sell/Trade
    Replies: 1
    Last Post: 12-08-2010, 08:43 PM
  2. Replies: 2
    Last Post: 11-01-2010, 11:52 PM
  3. C++ Tutorial(1) "Hello World".
    By CommittedC0der in forum C Tutorials
    Replies: 11
    Last Post: 01-29-2010, 09:28 AM
  4. Java:Tutorial - "Hello World"
    By John in forum Java Tutorials
    Replies: 20
    Last Post: 12-23-2008, 06:52 PM
  5. Replies: 9
    Last Post: 01-09-2007, 07:39 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts