Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

47 users online



New to PHP

New to PHP

Currently viewing this thread: 1 (0 members and 1 guests)


Macbeth

Macbeth

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:

Code:


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

Tristan_Wells

Tristan_Wells

I lived, Ill die
Status: Offline!

Try this, if you still get a blank page then PHP is configured wrong.

Code:


<?php phpinfo(); ?>

___________________

<?php signature(); ?>

Macbeth

Macbeth

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]

Profiler

Profiler

RUIN.
Status: Offline!

try it like this

Code:

<?php
echo "hello world";
?>

i used double quotes and got rid of the <br>.

___________________

Moeface.

ehman

ehman

Status: Offline!

the script is correct, you forgot to save the file as a .php

Macbeth

Macbeth

Well... I'm God...
Status: Offline!
Quote:

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)

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0075 seconds.