Running shell commands using PHP script

前端 未结 1 1289
灰色年华
灰色年华 2021-01-24 09:49

I\'m creating an app using CodeIgniter, but I\'m unable to run Linux commands using my PHP script.

How do I run terminal commands?

I\'ve tried shell_exec()

相关标签:
1条回答
  • 2021-01-24 10:13

    That depends on your server configuration if the functions are disabled, you need to enable them in your php.ini. Here are some alternatives:

    • popen()
    • or if you need an interactive way try proc_open()
    • system()
    0 讨论(0)
提交回复
热议问题