Jump to content


Photo

hello.php error?


  • Please log in to reply
2 replies to this topic

#1 shams

shams
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 26 March 2006 - 03:38 AM

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.

#2 shortj75

shortj75
  • Members
  • PipPipPip
  • Advanced Member
  • 118 posts
  • LocationPort Huron,mi

Posted 26 March 2006 - 07:40 AM

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

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

or like this


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

if none of them work then it is definatly the server
The Short One

hopfully this helps if it doesn't sorry
i won't write the code for you!!! you don't learn that way

#3 shams

shams
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 27 March 2006 - 02:35 AM

thanks the problem was with the server it worked in fedora core.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users