I think I misunderstood your question. You have a Perl script that returns HTML and SSI and you want that string, returned to PHP, to be parsed by Apache, so the SSI is evaluated, right?
Okay, now that I've sorted that out, I don't have an answer for you. Sorry. It seems like a very bad way to do things and you're making things harder than they should be. In thinking about it, are you really sure that virtual won't do what you want? http://www.php.net/manual/en/function.virtual.php virtual() is an Apache-specific function which is equivalent to <!--#include virtual...--> in mod_include. It performs an Apache sub-request. It is useful for including CGI scripts or .shtml files, or anything else that you would parse through Apache. Note that for a CGI script, the script must generate valid CGI headers. At the minimum that means it must generate a Content-type header. For PHP files, you need to use include() or require(); virtual() cannot be used to include a document which is itself a PHP file. ---John Holmes... ----- Original Message ----- From: "Sandman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 03, 2002 3:21 PM Subject: Re: [PHP] parsing of SSI scripts. > In article <007501c222c5$2014f020$2f7e3393@TB447CCO3>, > [EMAIL PROTECTED] (1lt John W. Holmes) wrote: > > > > I have a perl script that outputs HTML data. How would I do to execute > > > that script from within a php-script and have it's output parsed by > > > -apache-. > > > > > > I'm not talking about eval(), but rather have apache parse it to > > > invoke php for whatever code I output. Let's say the perl script > > > outputs: > > > > > > <span class="a">The year is <? print date("Y"); ?></span> > > > > > > Now, if I use system() or shell_exec(), the output is just printed to > > > the page and whatever php code there is is ignored. > > > > > > Is there ANY way to have the output parsed to make the above say "The > > > year is 2002"? > > > Look into exec() or virtual(). > > Neither returns apache-parsed output, especially not exec() > > > If the script is run over the web, you can just do a > > fopen("http://www.example.com/script.php"); and read the result. You can > > do the same for any other script that's run through the web b/c you'll > > receive it's parsed output, not the source. > > But apache won't parse CGI-scripts for php syntax, will they? And that > seems like a bad work-around. > > -- > Sandman[.net] > > -- > 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