Re: html and php in the same document

From: Date: Thu, 24 Jul 2003 16:23:10 +0000
Subject: Re: html and php in the same document
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-156681@lists.php.net to get a copy of this message
Miles Thompson wrote:
At 04:09 PM 7/24/2003 +0000, Curt Zirzow wrote:
* Thus wrote Curt Zirzow (curt@zirzow.dyndns.org):
* Thus wrote Bill Pilgrim (billpilgrim2000@yahoo.com):
If php and html are to be included in the same document, does the document extension always have to be .php ? Are there ways to include php into an html document without changing the extension?
Apache, IIS, Other? If apache: AddType application/x-httpd-php .php .html add this ----------------------------^^^^^
Btw, thats in your system http.conf, and if you have permissions to do that.
And every .html page is parsed by PHP. He will still have to turn PHP on and off within the page. Unless he *really* wants to hide usage of PHP, I don't see the point of doing this.
Probably because he has a bunch of HTML pages that he wants to add a little PHP to, without renaming all of the pages and all of the links. Have the web server parse .html files and add in what you need. For .html files without PHP, there's a _little_ overhead for the parser to quickly look through it. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals – www.phparch.com

« previous php.general (#156681) next »