PHP problem

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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
 
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.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Staff online

Top