[TriLUG] conflicting Options in httpd
Tanner Lovelace
clubjuggler at gmail.com
Mon Nov 14 12:09:29 EST 2005
On 11/14/05, Brian Henning <brian at strutmasters.com> wrote:
> Hi Guys,
> Actually the subject is probably worded poorly. Here's the deal:
>
> I have a file on my website that contains both PHP script and
> <!--#include virtual="url"--> directives. The problem is, if I name it
> (properly) with a .php extension, the include directives are ignored.
> And of course, if I name it with a .html extension, the php gets
> rendered as text instead of being processed.
>
> What do I need to do to get Apache to process Includes when they're in
> an HTML section of a PHP script? i.e.
>
> <?php
> ...stuff ...
> ?>
> <!--#include virtual="otherstuff.html"--> <-- This gets ignored
> <?php
> ...more stuff...
> ?>
>
> Thanks a lot!
You could replace the include with:
<?php readfile("otherstuff.html"); ?>
Cheers,
Tanner
--
Tanner Lovelace
clubjuggler at gmail dot com
http://wtl.wayfarer.org/
(fieldless) In fess two roundels in pale, a billet fesswise and an
increscent, all sable.
More information about the TriLUG
mailing list