Re: PHP not working in html
| From: | Dries Verachtert | Date: | Fri, 20 Dec 2002 10:49:01 +0000 |
| Subject: | Re: PHP not working in html | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-128965@lists.php.net to get a copy of this message | ||
You can also change the apache config to use php for .html pages.
example in apache 2.0.x:
<VirtualHost a.b.c.d:80>
... normal stuff like documentroot, servername, ..
<Files *.html>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
</VirtualHost>
Or globally in the /etc/httpd/conf.d/php.conf, add a:
<Files *.html>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
Example in apache 1.3.x:
Between the <IfModule mod_mime.c> and </IfModule> tags, add the
following:
AddType application/x-httpd-php .html
Kind regards,
Dries Verachtert
On Thu, 2002-11-07 at 22:27, 1LT John W. Holmes wrote:
> > PHP isn't working in my html docs - what changes do I need to make to get
> it
> > to do so? Does it need to be recompiled? Can I do it without
> re-compiling?
>
> Give your file a .php extension, maybe?
>
> ---John Holmes...
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php