duanfa0072 2012-02-01 10:46
浏览 107
已采纳

我可以从perl脚本填充php数组吗?

I am trying to copy the contents of an array generated from a Perl script into an array on a PHP page. Is this possible?

Current code in PHP file:

$campaigns_array[][] = shell_exec('recent_campaigns.pl $companyID');

recent_campaigns.pl runs some mySQL queries and creates an array from it. I don't know how to get that array from the Perl script.

Thanks in advance.

  • 写回答

2条回答 默认 最新

  • douling1936 2012-02-01 10:53
    关注

    The reply is either:

    1. parse the output and build the array from it, or
    2. modify the script so as to build a php string that you can eval, or
    3. dispense with the stupid script altogether and run the queries within php (after all, mysql connectivity is supposed to be one of PHP's strong suites)

    Being more precise is hard, as you are not providing an output sample and are not saying if you have control on the script output, etc.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?