Execute Perl CGI within PHP
| From: | Stefan | Date: | Fri, 05 Oct 2001 11:41:58 +0000 |
| Subject: | Execute Perl CGI within PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-70065@lists.php.net to get a copy of this message | ||
Hi
For some reasons I need to execute a Perl-CGI from within PHP.
I tried it that way:
$command = "C:\\Perl\\bin\\Perl.exe ".$basedir."myperl.pl";
$result = @passthru($command, $status);
now my Problem: the perl prints its output immidiatly to the browser and $result is empty after the
execution of the perl-script.
I needed the output in $result and don't want that the perl script prints to the browser...
The whole thing is running on a win2k Server machine.
Does someone know what I'm doing wrong?
By the way: which number in $status means what?
Stefan Rusterholz, s.rusterholz@interaktion.ch
----------------------------------
interaktion gmbh
Stefan Rusterholz
Zürichbergstrasse 17
8032 Zürich
----------------------------------
T. +41 1 253 19 55
F. +41 1 253 19 56
W3 www.interaktion.ch
----------------------------------