[TriLUG] conflicting Options in httpd

Brian Henning brian at strutmasters.com
Mon Nov 14 12:15:51 EST 2005


Oo!

Actually, readfile isn't the answer..  but looking at the docs for 
readfile led me to virtual(), which is in fact a sort of PHP 
pass-through for exactly the Apache #include virtual directive.

Thanks!
~B

Tanner Lovelace wrote:
> 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.

-- 
----------------
Brian A. Henning
strutmasters.com
336.597.2397x238
----------------



More information about the TriLUG mailing list