how to create a php page with dreamweaver

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

Post Reply
chao
Forum Newbie
Posts: 5
Joined: Wed Oct 13, 2010 4:46 pm

how to create a php page with dreamweaver

Post by chao »

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.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: how to create a php page with dreamweaver

Post by Jonah Bron »

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

Re: how to create a php page with dreamweaver

Post by chao »

Jonah Bron wrote:if you rightclick > view source (in your browser), what do you see?
I see all the codes.
User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

Re: how to create a php page with dreamweaver

Post by twinedev »

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
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: how to create a php page with dreamweaver

Post by Jonah Bron »

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

Re: how to create a php page with dreamweaver

Post by chao »

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

Re: how to create a php page with dreamweaver

Post by chao »

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.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: how to create a php page with dreamweaver

Post by Jonah Bron »

Did you install PHP? I would really recommend installing a WAMP stack; it makes things really easy.

http://www.wampserver.com/en/
chao
Forum Newbie
Posts: 5
Joined: Wed Oct 13, 2010 4:46 pm

Re: how to create a php page with dreamweaver

Post by chao »

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.
Post Reply