i hav a problem

m new to php nd i started with writin my first page but whenever i start my browser i see the complete code and nt the output i need

i wrote

<html>
	<title>my php page</title>
	<body>
	<?php
		echo "hello there!";
	?>
	</body>
</html>

the output is d same text above

help me

Recommended Answers

All 8 Replies

you need a web server.
for learning google xampp or wamp

Your probably not previewing the file via through the server. What testing server are you using? Make sure your url is something like with http://localhost/filename.php. Where filename.php is your file. Also make sure the file is saved in your htdocs folder.

Goto sourceforge.net and get the DevPHP IDE package, will give you a LocalHost server you can run your script on as part of the package, code highlighting, context help


i hav wamp5

i dnt knw....m writin d url correctly....

what extension have you given the file
/myfirstfile.php ? .txt .src .html may not parse

i downloaded apache http server 2.2, php 5 and mysql server 6.0...... dere occured a problem in php5 sayin dat manually configure ur server...bt i really dnt knw how to do that...

nd one more thing i need a connector for php and mysql

d links on d google site r broken

plz help out

you might run this program directly from the browser, you need to have some web server, just install WAMP or XAMPP on your PC, if you are windows user

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.