开发者

Perl Script in PHP

开发者 https://www.devze.com 2022-12-23 04:43 出处:网络
I have a perl script, which takes a query string parameter, connects to a database and displays data.开发者_StackOverflow中文版

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消