dongsaolian8786 2015-11-10 08:13
浏览 163

从PHP执行perl脚本

I trying to execute perl script from php with the following code:

$command = "/usr/bin/perl /var/www/html/perl/test.pl 1 2";
exec($command, $output);
var_dump($output);

But never works it.

I tried with system, passthru, exec_shell but script doesn't works.

Can you help me?

  • 写回答

1条回答 默认 最新

  • douzhong1907 2015-11-10 08:26
    关注

    Are you using a older version of PHP? If so, you might be runing in safe mode. Also you could check your folder privileges

    You can read more about safe mode here Link

    评论

报告相同问题?

悬赏问题

  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效