RE: [PHP] parsing of SSI scripts.
| From: | Andrew Chase | Date: | Wed, 03 Jul 2002 20:26:42 +0000 |
| Subject: | RE: [PHP] parsing of SSI scripts. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105286@lists.php.net to get a copy of this message | ||
I'm not sure if Apache will recursively process documents this way (Perl script -> HTML
output with embedded PHP -> parsed PHP), but what about adding this HTTP header to your PERL
script's output before the HTML/PHP code:
Content-type: application/x-httpd-php
That way Apache would (in theory) know know that the PERL script's output should be parsed by
PHP.
-Andy
> -----Original Message-----
> From: Sandman [mailto:mr@sandman.net]
> Sent: Wednesday, July 03, 2002 1:09 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] parsing of SSI scripts.
>
>
> In article <008c01c222c9$fa9c3fb0$2f7e3393@TB447CCO3>,
> holmes072000@charter.net (1lt John W. Holmes) wrote:
>
> > 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.
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> But my SSI script outputs data that contains PHP scripts, which I want to
> have parsed.
>
> --
> Sandman[.net]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>