Re: includes || perl
| From: | Sebastian | Date: | Mon, 24 Feb 2003 00:06:31 +0000 |
| Subject: | Re: includes || perl | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-136793@lists.php.net to get a copy of this message | ||
Thank you, that worked like a charm :)
I appreciate it.
warm regards,
Sebastian
----- Original Message -----
From: "Ernest E Vogelsinger" <ernest@vogelsinger.at>
To: "Sebastian" <sebastian@dslr.net>
Cc: "php list" <php-general@lists.php.net>
Sent: Sunday, February 23, 2003 6:37 PM
Subject: Re: [PHP] includes || perl
| I believe you cannot direct Apache to allow both PHP and the server-parsed
| handler to work on the same URL. You could however execute your perl
script
| as URL with PHP being the client, and add the output of this script to the
| output of your page, something like
|
| <?php
| // do some stuff
| // now call your script
| $buffer = null;
| $hf = fopen('http://localhost/myscript.pl', 'r');
| if ($hf) {
| while ($chunk = fread($hf, 4096))
| $buffer .= $chunk;
| fclose($hf);
| }
| // include the script's output in your page
| echo $buffer;
|
| This is basically what Apache does when it encounters an SSI directive.
|
|
| --
| >O Ernest E. Vogelsinger
| (\) ICQ #13394035
| ^ http://www.vogelsinger.at/