Interactive shell using PHP

后端 未结 8 974
醉话见心
醉话见心 2020-11-29 09:20

Just wondering, is it possible to create an interactive shell, using PHP alone. I mean something like you have with databases, python, etc.

If it is, how?

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 09:50

    Since this question has been asked and answered, a better solution has been added to PHP. In all recent PHP versions you can easily get user input as so:

    $input = fgets(STDIN);
    

提交回复
热议问题