dongyi6668 2016-08-31 11:32
浏览 621

php使用exec()返回127

I would like to execute a statement on my website, the server environment is LNMP, the single always return 127, can not be executed.


$dir = 'php /alidata/www/index.php gitblog exportsite';
exec("$dir",$output,$is_success);
print_r($output);
echo"<br>";
echo $is_success;
echo"<br>";
  • 写回答

1条回答 默认 最新

  • duangengruan2144 2016-08-31 11:39
    关注

    Error code 127 is returned for an illegal command. Try

    $output=array(); // $output should be an array
    $dir = '/alidata/www/index.php gitblog exportsite';
    exec("$(which php) $dir",$output,$is_success);
    
    评论

报告相同问题?

悬赏问题

  • ¥15 fesafe材料库问题
  • ¥35 beats蓝牙耳机怎么查看日志
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统