Jump to content

Archived

This topic is now archived and is closed to further replies.

shams

hello.php error?

Recommended Posts

hi,
i just started to learn php in mandirva 2006 from online manual, the frist php code was hello.php:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>
but when i run the browser for [a href=\"http://127.0.0.1/hello.php\" target=\"_blank\"]http://127.0.0.1/hello.php[/a] this is
the error message:
Server error!

The server encountered an internal error and was unable to complete your request.
Premature end of script headers: hello.php

If you think this is a server error, please contact the webmaster.

Share this post


Link to post
Share on other sites
i tested it on my server and it works fine so it must be a server plus just looking at it i can tell it is right
you can try it like this

[code]
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo "<p>Hello World</p>"; ?>
</body>
</html>
[/code]

or like this

[code]

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo 'Hello World'; ?>
</body>
</html>
[/code]

if none of them work then it is definatly the server

Share this post


Link to post
Share on other sites
thanks the problem was with the server it worked in fedora core.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.