1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

PHP problem

Discussion in 'Software Development' started by N.N.P, Sep 6, 2004.

Thread Status:
Not open for further replies.
Advertisement
  1. N.N.P

    N.N.P Thread Starter

    Joined:
    Jul 6, 2004
    Messages:
    27
    Hi, im very new to php (as in started learning 5 minutes ago) but i've come across a bit of a problem already. I got the following code from a php tutorial and apparently it should display todays date. I put it in a text file and saved it as a .html file but when i click on the page all i get is a blank white page. Im sure this is something incredibly basic but if someone can help it's appreciated.


    Code:
    <html> 
    <head> 
    <title>Listing 1-6</ title> 
    </head> 
    <body> 
    Today's date: <?php print( Date(" l F d, Y")); ?> 
    </body> 
    </html>
    

    I also tried saving it as a .php file and the same thing happened except first windows asked me what program i wanted to use to open the file. (I selected IE) Do i need some sort of server software installed for this to work? i.e apache

    Thanks
     
  2. brendandonhu

    brendandonhu

    Joined:
    Jul 8, 2002
    Messages:
    14,681
    You don't necessarily need a web server, but you need PHP from http://php.net
     
  3. deuce868

    deuce868

    Joined:
    Nov 2, 2000
    Messages:
    637
    PHP is a served language.(meaning it means to be processed, usually by a web server) The best thing to do is to get something like wamp that will setup a php/apache install on your machine. Then you must save your PHP files in the apache web root and pull them up from there.

    brendan is right though, you can run php command line, but you'll have fun once you get to learning about validating html forms.
     
  4. brendandonhu

    brendandonhu

    Joined:
    Jul 8, 2002
    Messages:
    14,681
    Oh and I might add that you can also do GUI programming using PHP-Gtk :)
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - problem
  1. n00e
    Replies:
    2
    Views:
    225
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/270750

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice