0

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?

4
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by jhudson0219
0

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.

0

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

1

try

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

Edited by Reverend Jim: Fixed formatting

0

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.

0

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

0

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?!

Edited by mike_2000_17: Fixed formatting

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.