alright im new and stuff, and im being hosted by spaceports.com to test my scritps with PHP and MySQL. well, i can't even get this code to show anything:
<html>
<head> <title></title> </head>
<body>
<?php
echo("hey everyone.");
?>
</body>
</html>
It comes up as a blank screen, as does everything else in PHP. Help please!
Strange, is the file definaltely called something .php? Did you view the source of the blank page to check it actually was blank? Other than that I'd suggest you contact your webhost and ask them.
You will need to talk to your host, it sounds like.
They will need to make sure the directory you're uploading into has scripting enabled.
I'm sure you also tried just <? open tag.
Also, I always do echo "stuff here" ; without the parentheses.
That is strange. But as was said, check the following (all in a nice checklist you can run down 🙂):
your page should have .php extension. If it does, make sure your host has .php enabled as a valid extention. Perhaps they use .phtml and/or .php3/.php4 instead...
remove those parenthesis
make sure you have put the file in the right location as directed by your host.
check the source code to see if anything is being sent to the browser. You might try putting some HTML code or just a line that says "This is outside the PHP code." Make sure that line is, uh, outside the PHP code.
Talk to your host and tell them to get on the ball 😃
As crouchl said, you could try using <? ?> tags, but <?php ?> tags always work -- so I doubt your problem is there.