Forum Moderators: coopster
include() gets the Perl code for the scripts if I use the server path, and my host has disabled using full URL's (http://example.com) in PHP includes. I tried
passthru(), but my host has disabled that, too. It sounds like
exec() would do what I need, and it doesn't seem to be disabled. But apparently I don't know how to use it for this purpose, because I can't get it to return anything. So back to the original question: How can I use PHP to execute a Perl script and print the HTML output?
Thanks in advance,
Matthew
[edited by: eelixduppy at 11:51 pm (utc) on Feb. 28, 2009]
[edit reason] made URL a link [/edit]
So back to the original question: How can I use PHP to execute a Perl script and print the HTML output?
Did you try the system() [us.php.net] command?
The difference is exec doesn't store the output of the executed command (unless you use the output parameter,) system() does.
$perl_output = system('myscript.cgi');
print $perl_output; // or echo