You are here: Re: [PHP] A basic question « PHP « IT news, forums, messages
Re: [PHP] A basic question

Posted by Stephen Leaf on 11/27/05 20:53

because the time.php is parsed by php before it's sent to the client.
the time.html is not it's assumed to be a static webpage and just sent as-is
to the client.

On Sunday 27 November 2005 12:46, Oil Pine wrote:
> Hi,
>
> I am new to php scripting and would like to ask you a basic question.
>
> Could you kindly explain to me why "time.php" works but "time.html" does
> not?
>
> pine
>
>
>
> time.php
> ------------------------------------------------------
> <?php
>
> $serverdate = date("l, d F Y h:i a");
> print ("$serverdate");
> print (" &nbsp; <p>");
>
> ?>
> ---------------------------------------------------------
>
>
> time.html
> ---------------------------------------------------------------
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
>
> <head>
> <title>Local Time</title>
> <meta name="GENERATOR" content="Text Editor">
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
> </head>
> <body>
> <p>This is a test.</p>
> <?php
> $serverdate = date("l, d F Y h:i a");
> print ("$serverdate");
> print (" &nbsp; <br>");
> ?>
> <p></p><p>This is the end.</p>
> </body>
> </html>
> -------------------------------------------------------------------

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация