[PHP] embedding php into html

2002-04-24 Thread Larry Brown

I have run many .php documents and generated html from them without
problems.  I have a client whose specific need to to keep the .html
extention.  I want to embed a php script into the html but the script won't
run.  I've tried two php enabled servers running apache and neither picks it
out.  Is there a trick I'm missing?


Larry S. Brown MCSE
Dimension Networks, Inc.
Member ICCA
(727) 723-8388




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] embedding php into html

2002-04-24 Thread Chris Wesley

On Wed, 24 Apr 2002, Larry Brown wrote:

 problems.  I have a client whose specific need to to keep the .html
 extention.  I want to embed a php script into the html but the script won't
 run.  I've tried two php enabled servers running apache and neither picks it
 out.  Is there a trick I'm missing?

 Larry S. Brown MCSE

In your Apache config, add .html to the list of extensions handled by php.
e.g. -
AddType application/x-httpd-php .phtml .php .php3 .html .php4

g.luck,
~Chris /\
   \ / Microsoft Security Specialist:
X  The moron in Oxymoron.
   / \ http://www.thebackrow.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] embedding php into html

2002-04-24 Thread Miguel Cruz

On Wed, 24 Apr 2002, Larry Brown wrote:
 I have run many .php documents and generated html from them without
 problems.  I have a client whose specific need to to keep the .html
 extention.  I want to embed a php script into the html but the script won't
 run.  I've tried two php enabled servers running apache and neither picks it
 out.  Is there a trick I'm missing?

Find the line in your httpd.conf file that looks like:

   AddType application/x-httpd-php .php

and add .html to it so that it looks more like:

   AddType application/x-httpd-php .php .html

This will cause PHP to get a crack at files ending with .html. As far as 
anyone seems to be able to tell, this doesn't slow anything down 
particularly.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] embedding php into html

2002-04-24 Thread Larry Brown

Chris Wesley wrote:

In your Apache config, add .html to the list of extensions handled by php.
e.g. -
AddType application/x-httpd-php .phtml .php .php3 .html .php4

This works great in my test site here.  Will this cause a lot of overhead if
I add that to the httpd.conf of a production server with 1000's of users
hitting html all day?  Like 10% hit in performance, 20...30...?  No
noticeable? :)


Larry S. Brown MCSE
Dimension Networks, Inc.
Member ICCA
(727) 723-8388

-Original Message-
From: Chris Wesley [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 7:57 PM
To: [EMAIL PROTECTED]
Cc: Larry Brown
Subject: Re: [PHP] embedding php into html

On Wed, 24 Apr 2002, Larry Brown wrote:

 problems.  I have a client whose specific need to to keep the .html
 extention.  I want to embed a php script into the html but the script
won't
 run.  I've tried two php enabled servers running apache and neither picks
it
 out.  Is there a trick I'm missing?

 Larry S. Brown MCSE


g.luck,
~Chris /\
   \ / Microsoft Security
Specialist:
X  The moron in Oxymoron.
   / \ http://www.thebackrow.net



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] embedding php into html

2002-04-24 Thread Larry Brown

It looks like Miquel got to the performance issue already.  Thanks guys for
helping me on this.

Larry S. Brown MCSE
Dimension Networks, Inc.
Member ICCA
(727) 723-8388

-Original Message-
From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 8:00 PM
To: Larry Brown
Cc: PHP List
Subject: Re: [PHP] embedding php into html

On Wed, 24 Apr 2002, Larry Brown wrote:
 I have run many .php documents and generated html from them without
 problems.  I have a client whose specific need to to keep the .html
 extention.  I want to embed a php script into the html but the script
won't
 run.  I've tried two php enabled servers running apache and neither picks
it
 out.  Is there a trick I'm missing?

Find the line in your httpd.conf file that looks like:

   AddType application/x-httpd-php .php

and add .html to it so that it looks more like:

   AddType application/x-httpd-php .php .html

This will cause PHP to get a crack at files ending with .html. As far as
anyone seems to be able to tell, this doesn't slow anything down
particularly.

miguel


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php