New PHP User at Webhost globat.com

New PHP User at Webhost globat.com

am 03.08.2007 00:04:49 von VaryingHare

Okay, I'm totally new at PHP, but I can handle HTML okay. Trying to
start a PHP application on my webhost globat.com.

If I write an HTML page as follows:



<br /> This is my first PHP test<br />


Hello


print "Hello Web!";
?>


Bye




and upload it to my website and then I access it using IE6.0,
shouldn't I get more than "Hello" and "Bye" a few lines later. I
should get a "Hello Web!" in between, right? But I don't. I'm told
Globat supports PHP and that all I need to do is insert the PHP
scripts into the HTML code. Is it that easy? Is there more I need to
do? Do I need to enter any settings or parameters anywhere? Set up
special subdirectories? Copy any PHP or other files to Globat, etc.?
Any advice would be helpful? Note: I do have a good book on PHP and
this was the first example it gave.

Re: New PHP User at Webhost globat.com

am 03.08.2007 00:14:44 von Hendri Kurniawan

On Aug 3, 8:04 am, VaryingHare wrote:
> Okay, I'm totally new at PHP, but I can handle HTML okay. Trying to
> start a PHP application on my webhost globat.com.
>
> If I write an HTML page as follows:
>
>
>
> <br /> > This is my first PHP test<br /> >
>
>
> Hello


> > print "Hello Web!";
> ?>
>

Bye

>
>
>
> and upload it to my website and then I access it using IE6.0,
> shouldn't I get more than "Hello" and "Bye" a few lines later. I
> should get a "Hello Web!" in between, right? But I don't. I'm told
> Globat supports PHP and that all I need to do is insert the PHP
> scripts into the HTML code. Is it that easy? Is there more I need to
> do? Do I need to enter any settings or parameters anywhere? Set up
> special subdirectories? Copy any PHP or other files to Globat, etc.?
> Any advice would be helpful? Note: I do have a good book on PHP and
> this was the first example it gave.

If your host support PHP, no.. you shouldn't need to install or copy
anything else
except your php file.

Without any further information, I can only guess that the extension
is the problem.
Make sure that you have a .php extension (Default extension for most
web-server for php scripts)

Hendri Kurniawan

Re: New PHP User at Webhost globat.com

am 03.08.2007 00:17:18 von Thiamath

On Aug 3, 12:04 am, VaryingHare wrote:
> Okay, I'm totally new at PHP, but I can handle HTML okay. Trying to
> start a PHP application on my webhost globat.com.
>
> If I write an HTML page as follows:
>
>
>
> <br /> > This is my first PHP test<br /> >
>
>
> Hello


> > print "Hello Web!";
> ?>
>

Bye

>
>
>
> and upload it to my website and then I access it using IE6.0,
> shouldn't I get more than "Hello" and "Bye" a few lines later. I
> should get a "Hello Web!" in between, right? But I don't. I'm told
> Globat supports PHP and that all I need to do is insert the PHP
> scripts into the HTML code. Is it that easy? Is there more I need to
> do? Do I need to enter any settings or parameters anywhere? Set up
> special subdirectories? Copy any PHP or other files to Globat, etc.?
> Any advice would be helpful? Note: I do have a good book on PHP and
> this was the first example it gave.

It seems a server problem.
What is the name of your file?
If it is "index.htm" or similar, try to rename to "index.php". Some
servers can't parse PHP code if the file's extension is not .php
In my first steps with PHP that was my 1st problem too!

PD.
The code seems to be right.
GOOD LUCK

Re: New PHP User at Webhost globat.com

am 03.08.2007 00:32:44 von VaryingHare

You guys are good and fast. You solved my problem. Thanks. Having
a .php file extension, insteal of .html, solved the problem. Now, why
do I get the colorful PHP table at the end of the display with all the
compile/configuration information?

Re: New PHP User at Webhost globat.com

am 03.08.2007 00:55:39 von VaryingHare

Sorry, you may ignore prior post. The table resulted from inadvertent
corruption in my PHP file from a prior download attempt. So with the
clue about the .PHP extension, I'm on my way. Thanks again.