I have a perl script, which takes a query string parameter, connects to a database and displays data.
开发者_StackOverflow中文版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?
With backticks?
echo `/path/to/perl perlscript.pl item=302`
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.
精彩评论