加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

交互式PHP shell如何工作?

发布时间:2020-12-13 22:35:02 所属栏目:PHP教程 来源:网络整理
导读:我在终端中使用命令php -a在 PHP的交互式shell中,但没有命令正常工作.我甚至尝试了一个简单的2 * 2,但我没有得到任何结果. 我做错了什么,它是如何工作的? 在 the documentation for the interactive shell,Ryan P.的第一个音符有一些值得注意的信息: Inter
我在终端中使用命令php -a在 PHP的交互式shell中,但没有命令正常工作.我甚至尝试了一个简单的2 * 2,但我没有得到任何结果.

我做错了什么,它是如何工作的?

在 the documentation for the interactive shell,Ryan P.的第一个音符有一些值得注意的信息:

Interactive Shell and Interactive Mode are not the same thing,despite the similar names and functionality.

If you type php -a and get a response of ‘Interactive Shell’ followed by a php> prompt,you have interactive shell available (PHP was compiled with readline support). If instead you get a response of ‘Interactive mode enabled’,you DO NOT have interactive shell available and this article does not apply to you.

因此,如果您只启用“交互模式”,那么您将只能输入PHP代码,然后在完成后,发送PHP EOF来执行它.

这可能不是你想要的.您可能想要查看phpsh.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读