Re: parsing of SSI scripts.

From: Date: Wed, 03 Jul 2002 19:21:52 +0000
Subject: Re: parsing of SSI scripts.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-105265@lists.php.net to get a copy of this message
In article <007501c222c5$2014f020$2f7e3393@TB447CCO3>, holmes072000@charter.net (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]

« previous php.general (#105265) next »