[PHP] PHP not parsed in HTML

2002-02-12 Thread SpyProductions Support Team


Hhere's another humdinger of a question:

I am with a hosting company that doesn't want to parse PHP in HTML files
because they are afraid it will slow down their server(s) too much.

So.  I really like them and don't want to move the site if I don't really
*have* to.  There are some neat things I would love to be doing in the HTML
on it, though.

I was thinking; could I make some sort of little javacript calling on, or
including the PHP file I want to run on the HTML page?

Thanks,

-Mike



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




Re: [PHP] PHP not parsed in HTML

2002-02-12 Thread Lars Torben Wilson

On Tue, 2002-02-12 at 12:36, SpyProductions Support Team wrote:
 
 Hhere's another humdinger of a question:
 
 I am with a hosting company that doesn't want to parse PHP in HTML files
 because they are afraid it will slow down their server(s) too much.
 
 So.  I really like them and don't want to move the site if I don't really
 *have* to.  There are some neat things I would love to be doing in the HTML
 on it, though.
 
 I was thinking; could I make some sort of little javacript calling on, or
 including the PHP file I want to run on the HTML page?
 
 Thanks,
 
 -Mike

Can't think of a way to do it in JS off the top of my head--JS is 
client-side, which PHP is server-side. You could try putting this
in your .htaccess file and see what happens:

IfModule mod_php4.c
   AddType application/x-httpd-php .html .inc .php
/IfModule

...which, if the PHP module is available in the server, will tell
the server to run these file types through PHP. Alternately, you could
compile PHP as a CGI and just install it in your home dir and use that.


Hope this helps,

Torben

-- 
 Torben Wilson [EMAIL PROTECTED]
 http://www.thebuttlesschaps.com
 http://www.hybrid17.com
 http://www.inflatableeye.com
 +1.604.709.0506


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




RE: [PHP] PHP not parsed in HTML

2002-02-12 Thread Kevin Stone

Hostrocket.com, one of the ISPs we host our clients web sites on, allows
us to do this by simply adding the following lines into the .htaccess
file in account's home directory..

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

I do not know if this is a general solution or one specific to their
servers.  But it works well and is search engine friendly.  I don't see
any degradation in speed as a result of it.

--
Kevin Stone
[EMAIL PROTECTED]
www.helpelf.com

 -Original Message-
 From: SpyProductions Support Team [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 12, 2002 1:37 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP not parsed in HTML
 
 
 Hhere's another humdinger of a question:
 
 I am with a hosting company that doesn't want to parse PHP in HTML
files
 because they are afraid it will slow down their server(s) too much.
 
 So.  I really like them and don't want to move the site if I don't
really
 *have* to.  There are some neat things I would love to be doing in the
 HTML
 on it, though.
 
 I was thinking; could I make some sort of little javacript calling on,
or
 including the PHP file I want to run on the HTML page?
 
 Thanks,
 
 -Mike
 
 
 
 --
 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