I am currently using AppServ to display my PHP code. I am having a problem of the content of the body not displaying however. Here is the code that I am using:

<html>

<head>
<title>My First PHP Page</title>
</head>

<body>
<?php
echo "Hello World!";
?>
</body>

</html>

When I try to view it in my browser, the title of the page is displaying, but the body is blank. I know very little about AppServ or PHP for that matter, and have no idea why I am getting these results. Anyone have ideas on what my problem is or why I am getting these results?

The first thing to check is how you saved the module. If it doesn't have a .php suffix (xxxx.php) then it won't be recognized as a php module and your php code won't be executed.

The first thing to check is how you saved the module. If it doesn't have a .php suffix (xxxx.php) then it won't be recognized as a php module and your php code won't be executed.

It's saved as HelloWorld.php

try

<html>
<head>
<title>My First Php Page</title>
</head>
<body>
<p><?php
echo 'Hello World!';
?></p>
</body>
</html>

and i reccomend that you download notepad ++ it is a great free script editor, its only a couple of meg too search it on google. you just click to save as a php so there wouldnt be any hassles there.

one thing is for sure.... your PHP tags is not parsed... maybe you have problem on your PHP server, or maybe you didn't put it the root directory or you didn't save it as .php

try

<html>
<head>
<title>My First Php Page</title>
</head>
<body>
<p><?php
echo 'Hello World!';
?></p>
</body>
</html>

end quote.

try it, but it still isn't working. I'm starting to think that maybe I didn't set up the AppServ correctly. That could be my problem too right?!

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.