Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Oct 2001 13:24:33 -0700 (PDT)
From:      Linh Pham <lplist@closedsrc.org>
To:        "Gerald T. Freymann" <freymann@eagle.ca>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: quick php/apache question re the tags
Message-ID:  <20011016131318.M33262-100000@q.closedsrc.org>
In-Reply-To: <00de01c1567d$2c2f1b70$0f01a8c0@phantom>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2001-10-16, Gerald T. Freymann scribbled:

# If I call up this sample html file with a web browser, I get a blank page
# and a correct title:
#
# <html>
#     <head>
#         <title>Example</title>
#     </head>
#     <body>
#
#         <?php
#         echo "Hi, I'm a PHP script!";
#         ?>
#
#     </body>
# </html>
#
# But if I put the exact same code into a file called "text.php" the results
# are what you'd expect.
#
# What am I missing in order to have php command in an html file and have
# then processed?

That's the why it's supposed to work. Apache handles .htm/.html files by
just reading them in and spitting the entire file, unchanged back to
the browser.

When it enoucnters a .php file, it reads it in and sends to the PHP
parser and Apache gets back the processed file and sends it to the
browser.

Why change it?

-- 

Linh Pham
[lplist@closedsrc.org]

# Every solution breeds new problems




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011016131318.M33262-100000>