Re: Re: A basic question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yeah, Apache (or other web server) just gives the HTML page to the web
browser without really doing anything, if a page has a .php extension Apache
gives the page to PHP which proccesses it and returns it to Apache and
Apache gives it to the client. You could do what Matt Monaco says and let
every HTML and PHP page be parsed by PHP but it makes load time slower for
HTML pages with no PHP in them
On 11/27/05, Matt Monaco <mmonaco3@xxxxxxx> wrote:
>
> In your server configuration file (httpd.conf for apache) you specify
> which
> extensions are parsed by the php module.  It is perfectly acceptable for
> you
> to specify .html in addition to .php as a parsed extension.
>
> "Oil Pine" <oil.pine@xxxxxxxxx> wrote in message
> news:1133117217.4438.27.camel@xxxxxxxxxxxxxxxxx
> > 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>
> > -------------------------------------------------------------------
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux