Executing unix shell commands using PHP

前端 未结 7 591
再見小時候
再見小時候 2020-12-16 01:17

A text box will be used to capture the command. I\'ve been told that I have to use the exec() function to execute UNIX shell commands.

Something like th

相关标签:
7条回答
  • 2020-12-16 02:14

    As long as it is one line you can just echo the return value of exec.

    Like so:

    echo exec('ls');

    But it only displays the first line.

    0 讨论(0)
提交回复
热议问题