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条)

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。