PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
chao
Forum Newbie
Posts: 5 Joined: Wed Oct 13, 2010 4:46 pm
Post
by chao » Wed Oct 13, 2010 4:50 pm
i created a php page with the codes below, but when I try to run it nothing shows on the page. can anyone help me out with this.
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Using Echo()</title>
</head>
<body>
<?php
print 'Hello World! This is my first time coding PHP!!' ;
?>
</body>
</html>
Last edited by
Benjamin on Thu Oct 14, 2010 7:54 am, edited 1 time in total.
Reason: Added [syntax=php] tags.
Jonah Bron
DevNet Master
Posts: 2764 Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California
Post
by Jonah Bron » Wed Oct 13, 2010 5:07 pm
if you rightclick > view source (in your browser), what do you see?
chao
Forum Newbie
Posts: 5 Joined: Wed Oct 13, 2010 4:46 pm
Post
by chao » Wed Oct 13, 2010 5:21 pm
Jonah Bron wrote: if you rightclick > view source (in your browser), what do you see?
I see all the codes.
twinedev
Forum Regular
Posts: 984 Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio
Post
by twinedev » Wed Oct 13, 2010 6:02 pm
Stepping back to the basics, what did you name the file (use a .php extension), and where is it hosted (ie, not a asp environment)?
-Greg
Jonah Bron
DevNet Master
Posts: 2764 Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California
Post
by Jonah Bron » Wed Oct 13, 2010 6:22 pm
And is it hosted at all, or are you trying it on your own computer?
chao
Forum Newbie
Posts: 5 Joined: Wed Oct 13, 2010 4:46 pm
Post
by chao » Thu Oct 14, 2010 7:53 am
twinedev wrote: Stepping back to the basics, what did you name the file (use a .php extension), and where is it hosted (ie, not a asp environment)?
-Greg
I named the file second.php
chao
Forum Newbie
Posts: 5 Joined: Wed Oct 13, 2010 4:46 pm
Post
by chao » Thu Oct 14, 2010 7:56 am
Jonah Bron wrote: And is it hosted at all, or are you trying it on your own computer?
yes im trying it on my own pc, so i set a web service using IIS on windowsXP.
chao
Forum Newbie
Posts: 5 Joined: Wed Oct 13, 2010 4:46 pm
Post
by chao » Thu Oct 14, 2010 10:58 am
Jonah Bron wrote: Did you install PHP? I would really recommend installing a WAMP stack; it makes things really easy.
http://www.wampserver.com/en/
fixed the problem thanks alot.