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. URAL 1966 Cycling Roads 计算几何

    Cycling Roads 题目连接: http://acm.hust.edu.cn/vjudge/contest/123332#problem/F Description When Vova was ...

  2. 外键的约束(Mysql、PostgreSQL)

    关于外键是什么,具体不再详述,可以自行百度. 讲一下关于外键的 On Delete和On Update的使用 最近在项目的表中看到这些,不懂顺便查了查: ONSTRAINT "c_clust ...

  3. 没用过的函数 GetHomePath - 获取用户程序数据目录

    uses System.IOUtils; procedure TForm1.FormCreate(Sender: TObject); var S: string; begin { 三种方法结果一致: ...

  4. 【汇总】PHP-FPM 配置优化(转)

    -----------------------开启php-fpm慢脚本日志 request_slowlog_timeout = 30sslowlog = /usr/local/php/var/log/ ...

  5. C#中执行Dos命令

    //dosCommand Dos命令语句 public string Execute(string dosCommand) { ); } /// <summary> /// 执行DOS命令 ...

  6. AngularJS使用OData请求ASP.NET Web API资源的思路

    本篇整理AngularJS使用OData请求ASP.NET Web API资源的思路. 首先给ASP.NET Web API插上OData的翅膀,通过NuGet安装OData. 然后,给control ...

  7. ASP.NET MVC遍历ModelState的错误信息

    在ASP.NET MVC中,ModelState中包含了验证失败的错误信息,具体被存储在ModelState.Values[i].Errors[j].ErrorMessage属性中.当然,通过打断点, ...

  8. 解决警告 warning: directory not found for option

    解决方法: 选择项目名称----->Targets----->Build Settings----->Search Paths----->Library Search Path ...

  9. 并查集(Union-Find) 应用举例 --- 基础篇

    本文是作为上一篇文章 <并查集算法原理和改进> 的后续,焦点主要集中在一些并查集的应用上.材料主要是取自POJ,HDOJ上的一些算法练习题. 首先还是回顾和总结一下关于并查集的几个关键点: ...

  10. mysql error You must reset your password using ALTER USER statement before executing this statement.

    mysql修改密码Your password does not satisfy the current policy requirements 出现这个问题的原因是:密码过于简单.刚安装的mysql的 ...