douguio0185 2016-02-05 12:27
浏览 567

有没有替代PHP exec(),shell_exec(),system(),passthrough()函数?

Is there any alternative for PHP exec(), shell_exec(), system(), passthrough() functions? As all these functions have security risk, need a way to execute server commands without using any of these functions.

Due to security reasons, can't enable these functions on my server php configuration. But as per website requirement, I need to execute some external commands like server ssh commands through php script. So, if there are any alternative ways to achieve same then please reply back to me.

  • 写回答

1条回答 默认 最新

  • dpvv37755 2016-02-05 12:31
    关注

    You can write shell or bash scripts and invoke them through cron or set a daemon and let it check for a specific flag in database if you can do that.

    评论

报告相同问题?