
January 23rd, 2004
01:18 AM
Well... I'm God...
Status: Offline!
New to PHP
Okay. From the title, you can guess that I'm new to PHP. And I don't mean like, a week new. I mean like, an hour. After getting a server set up on my computer, I've finally started actually making .PHP files and viewing them on my computer.
That's where the problem comes in. I opened notepad, and did the most simple beginning step of all. The notorious: "Hello World". Here's what my code looks like:
<?php
echo 'hello world<br>';
?>
And that's all that's in the whole document. The only text that I even have in notepad. Not <html> or anything else of the sort. Now, the problem:
The server acknowledges the fact that there's a PHP file that it has to recognize, but the whole page is white. No 404, or file not found. Just the entire page is white.
Any ideas?
___________________
[size=0][[url=http://www.studio16.org]x[/url]] Studio16 [[url=http://protus.deviantart.com]x[/url]] DeviantART[/size]

January 23rd, 2004
02:03 AM
I lived, Ill die
Status: Offline!
Try this, if you still get a blank page then PHP is configured wrong.
___________________
<?php signature(); ?>

January 23rd, 2004
04:03 AM
Well... I'm God...
Status: Offline!
That works....
___________________
[size=0][[url=http://www.studio16.org]x[/url]] Studio16 [[url=http://protus.deviantart.com]x[/url]] DeviantART[/size]

January 23rd, 2004
04:42 AM
try it like this
<?php
echo "hello world";
?>
i used double quotes and got rid of the <br>.
___________________
Moeface.

January 23rd, 2004
07:32 AM
the script is correct, you forgot to save the file as a .php

January 23rd, 2004
04:56 PM
Well... I'm God...
Status: Offline!
Originally posted by ehman
the script is correct, you forgot to save the file as a .php
I'm new to PHP, not coding and webdesign as a whole. :P
Had I forgotten to save the file as a .php, and simply saved the file as, say: "blah.txt" or "blah.html", then when I went to actually view "blah.php" I would have gotten a "file not found" or a 404 error. Not a plain white page.
My only guess is it's the configuration, or something along those lines. I agree the code is right, unless I have to have some HTML tags somewhere in the coding, in which case there is none; only plain PHP tags.
___________________
[size=0][[url=http://www.studio16.org]x[/url]] Studio16 [[url=http://protus.deviantart.com]x[/url]] DeviantART[/size]
Last edited by Macbeth, January 23rd, 2004 04:59 PM (Edited 1 times)