|
Posted by Thiamath on 08/02/07 22:17
On Aug 3, 12:04 am, VaryingHare <VaryingH...@gmail.com> 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:
>
> <HTML>
> <HEAD>
> <TITLE>
> This is my first PHP test
> </TITLE>
> </HEAD>
> <BODY>
> Hello<br><br>
> <?php
> print "Hello Web!";
> ?>
> <br><br>Bye<br>
> </BODY>
> </HTML>
>
> 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
[Back to original message]
|