1. 发现运行php 的interactive shell 的时候,不能输入一行执行一行,而要 输入完一整段内容,再按  ctrl + d才能执行这段内容。

原因是,没安装 readline这个模块,

有安装readline就可以

http://php.net/manual/en/features.commandline.interactive.php

https://stackoverflow.com/questions/14792842/how-does-the-interactive-php-shell-work

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.

You can also check 'php -m' and see if readline is listed in the output - if not, you don't have interactive shell.

Interactive mode is essentially like running php with stdin as the file input. You just type code, and when you're done (Ctrl-D), php executes whatever you typed as if it were a normal PHP (PHTML) file - hence you start in interactive mode with '<?php' in order to execute code.

php5.6 的interactive模式的更多相关文章

  1. MySQL Hardware--CentOS 6修改CPU性能模式

    cpufrequtils命令 ## 安装: yum install cpufrequtils ## 查看CPU信息: cpufreq-info -m 输出CPU信息为: analyzing CPU : ...

  2. 解决PHP5.6版本“No input file specified”的问题

    问题描述:使用TP框架做项目时,在启用REWRITE的伪静态功能的时候,首页可以访问,但是访问其它页面的时候,就提示:“No input file specified.”原因在于使用的PHP5.6是f ...

  3. Interactive and non-interactive shell环境变量的差异

    背景 在mac上安装mosh server后,用mosh client去连接,一直报command not found的错 zsh: command not found: mosh-server 但是 ...

  4. nginx下配置php5和php7

    用的是lnmp 一键安装的 php5.6版本网上百度Ubuntu安装多版本PHP就行 参考文章原链接:http://blog.csdn.net/21aspnet/article/details/476 ...

  5. Windows下PHP版本选取

    1. 下载地址 http://windows.php.net/download/ 2. PHP大版本 PHP4:由于太古老.对OO支持不力已基本被淘汰. PHP5:分为三个分支——PHP5.2之前的版 ...

  6. foreach 相关

    20 Nov 08 深入理解PHP原理之foreach 作者: Laruence(   ) 本文地址: http://www.laruence.com/2008/11/20/630.html 转载请注 ...

  7. Browser 與 Server 持續同步的作法介紹 (Polling, Comet, Long Polling, WebSocket)长连接

    對 Comet 的懵懂 記得兩年多前,第一次看到 Gmail 中的 GTalk 覺得很好奇:「咦?線上聊天且是 Google 的熱門系統,只用傳統的 AJAX 應該會操爆伺服器吧?」很幸運的,當時前公 ...

  8. 【Linux】CentOS系统

    版本号:CentOS release 5.7 1)查看系统版本号 cat  /etc/readhat-release 2)安装软件 wget  资源链接 make make install 在线安装: ...

  9. Linux启动时间优化-内核和用户空间启动优化实践

    关键词:initcall.bootgraph.py.bootchartd.pybootchart等. 启动时间的优化,分为两大部分,分别是内核部分和用户空间两大部分. 从内核timestamp 0.0 ...

随机推荐

  1. Java Web c3p0 pool池泄漏优化与日志分析

    问题跟踪: 近期在整合SSH(spring.springmvc.hibernate)项目,提供给第三方服务.每当调用内存池达到上限之后,外界调用服务直接失败,提示[cannot open connec ...

  2. j.u.c系列(06)---之锁条件:Condition

    写在前面 在没有Lock之前,我们使用synchronized来控制同步,配合Object的wait().notify()系列方法可以实现等待/通知模式.在Java SE5后,Java提供了Lock接 ...

  3. 面向企业级的开源WebGIS解决方案--MapGuide(对比分析)

    在技术特点.功能.架构等方面,MapGuide与其他WebGIS产品有什么区别?本文主要从此角度来介绍MapGuide的特性,以供参考.    本人选择了比较熟悉的几款WebGIS产品:MapServ ...

  4. HDU 4738 Caocao's Bridges (2013杭州网络赛1001题,连通图,求桥)

    Caocao's Bridges Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...

  5. Delphi的命令行编译命令

    Borland出品的Delphi,有着闪电般的编译速度,但是在界面控件使用较多.工程项目较大的时候,编译一个工程仍需要一段时间,打开庞大的Delphi IDE,也需要时间.其实,在一个工程开发结束,调 ...

  6. Java Calendar,Date,DateFormat,TimeZone,Locale等时间相关内容的认知和使用(4) DateFormat

    本章主要介绍DateFormat. DateFormat 介绍 DateFormat 的作用是 格式化并解析“日期/时间”.实际上,它是Date的格式化工具,它能帮助我们格式化Date,进而将Date ...

  7. Android开发 AIDL使用自定义对象作参数或返回值

    http://www.pocketdigi.com/20121129/952.html 默认,AIDL支持对象作参数,但需要该对象实现Parcelable接口,且aidl文件应该是该类在同一包下,需要 ...

  8. java高分局之jstat命令使用(转)

    转自:http://blog.csdn.net/h_025/article/details/52813817 java高分局之jstat命令使用 jstat命令可以查看堆内存各部分的使用量,以及加载类 ...

  9. WorkerThread与MainThread之间通过Handler进行最简单的消息传递

    一.从自己开启的线程中给主线程发送信息,更新UI 这个实例的效果是,在线程中通过handler发送一条信息给handler,然后通过handler更改UI线程中,textview的文字. 主要方法是( ...

  10. Datagridview 在基于文本的单元格中启用换行,自动调整行高列宽

    将 DataGridViewCellStyle的 WrapMode 属性设置为 DataGridViewTriState 枚举值之一.下面的代码示例使用 System.Windows.Forms.Da ...