tags:

views:

44

answers:

2
+1  Q: 

Perl Script in PHP

I have a perl script, which takes a query string parameter, connects to a database and displays data.

I'd like to include that script in a PHP file like so:

include('perlscript.pl?item=302');

Such that the perl script's response is displayed on the PHP/HTML page.

How can I do this?

+1  A: 

With backticks?

echo `/path/to/perl perlscript.pl item=302`
mobrule
thanks, that worked!
Sev
A: 

If safe_mode is on or shell_exec is disabled, one option is to fetch the content of your script using fopen() or using curl.

Scuzzy