开发者

Perl Script in PHP

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜