1.php -v 查看版本号

 
[root@rs-2 lib]# php -v
 
PHP 5.5.11 (cli) (built: Apr 29 2014 12:35:52)
 
Copyright (c) 1997-2014 The PHP Group
 
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
 
 
2.php -h 查看帮助
 
 
3.php -m 查看安装的模块
 
[root@rs-2 lib]# php -m
 
[PHP Modules]
 
Core
 
type
 
 
4.php -i 查看php信息(查看php.ini非常方便)
 
[root@rs-2 lib]# php -i | grep php.ini
 
Configuration File (php.ini) Path => /usr/local/lib
 
Loaded Configuration File => /usr/local/lib/php.ini
 
 
5.php --ini 显示配置文件名字
 
[root@rs-2 ~]# php --ini
 
Configuration File (php.ini) Path: /usr/local/lib
 
Loaded Configuration File: /usr/local/lib/php.ini
 
Scan for additional .ini files in: (none)
 
Additional .ini files parsed: (none)
 
 
6.php -f 执行php文件
 
[root@rs-2 phpTest]# php -f helloworld.php
 
helloword
 
 
更多使用技巧请看php -h
 
[root@rs-2 ~]# php -h
 
Usage: php [options] [-f] [--] [args...]
 
php [options] -r [--] [args...]
 
php [options] [-B ] -R [-E ] [--] [args...]
 
php [options] [-B ] -F [-E ] [--] [args...]
 
php [options] -S : [-t docroot]
 
php [options] -- [args...]
 
php [options] -a
 
 
-a Run interactively
 
-c | Look for php.ini file in this directory
 
-n No php.ini file will be used
 
-d foo[=bar] Define INI entry foo with value 'bar'
 
-e Generate extended information for debugger/profiler
 
-f Parse and execute .
 
-h This help
 
-i PHP information
 
-l Syntax check only (lint)
 
-m Show compiled in modules
 
-r Run PHP without using script tags
 
-B Run PHP before processing input lines
 
-R Run PHP for every input line
 
-F Parse and execute for every input line
 
-E Run PHP after processing all input lines
 
-H Hide any passed arguments from external tools.
 
-S : Run with built-in web server.
 
-t Specify document root for built-in web server.
 
-s Output HTML syntax highlighted source.
 
-v Version number
 
-w Output source with stripped comments and whitespace.
 
-z Load Zend extension .
 
 
args... Arguments passed to script. Use -- args when first argument
 
starts with - or script is read from stdin
 
 
--ini Show configuration file names
 
 
--rf Show information about function .
 
--rc Show information about class .
 
--re Show information about extension .
 
--rz Show information about Zend extension .
 
--ri Show configuration for extension .
 
http://www.35ui.cn/post/20151226538.html

php常用命令大全的更多相关文章

  1. db2常用命令大全

    #显示这个DB2错误的解释信息(SQLSTATE 5位数字)db2 ? 42704 #显示这个SQLCODE的解释信息(SQLCODE 四位数字) db2 ? SQL0204N ##查看数据库指定配置 ...

  2. linux 常用命令大全

    linux 常用命令大全 系统信息 arch 显示机器的处理器架构(1) uname -m 显示机器的处理器架构(2) uname -r 显示正在使用的内核版本 dmidecode -q 显示硬件系统 ...

  3. Ubuntu常用命令大全(转)

    点评:Ubuntu常用命令大全,学习ubuntn系统的朋友可以收藏下,用ctrl+F查找即可 一.文件/文件夹管理 ls 列出当前目录文件(不包括隐含文件) ls -a 列出当前目录文件(包括隐含文件 ...

  4. 100个命令Linux常用命令大全

    Linux常用命令大全100条: 1,echo "aa" > test.txt 和 echo "bb" >> test.txt//>将原 ...

  5. Linux常用命令大全(非常全!!!)

    Linux常用命令大全(非常全!!!) 最近都在和Linux打交道,感觉还不错.我觉得Linux相比windows比较麻烦的就是很多东西都要用命令来控制,当然,这也是很多人喜欢linux的原因,比较短 ...

  6. Linux常用命令大全(转)

    (转)Linux常用命令大全(非常全!!!) 最近都在和Linux打交道,感觉还不错.我觉得Linux相比windows比较麻烦的就是很多东西都要用命令来控制,当然,这也是很多人喜欢linux的原因, ...

  7. 18-10-09 Linux常用命令大全(非常全!!!)

     Linux常用命令大全(非常全!!!)   Linux常用命令大全(非常全!!!) 最近都在和Linux打交道,感觉还不错.我觉得Linux相比windows比较麻烦的就是很多东西都要用命令来控制, ...

  8. Ubuntu常用命令大全[显示桌面]

    Ubuntu常用命令大全 查看软件xxx安装内容 #dpkg -L xxx 查找软件 #apt-cache search 正则表达式 查找文件属于哪个包 #dpkg -S filename apt-f ...

  9. [转] Linux常用命令大全(非常全!!!)

    出处:https://www.cnblogs.com/yjd_hycf_space/p/7730690.html Linux常用命令大全(非常全!!!) 最近都在和Linux打交道,感觉还不错.我觉得 ...

  10. Ubuntu 常用命令大全

    Ubuntu 常用命令大全查看软件 xxx 安装内容#dpkg -L xxx查找软件#apt-cache search 正则表达式查找文件属于哪个包#dpkg -S filename apt-file ...

随机推荐

  1. ASP.NET的三层架构(DAL,BLL,UI)

    ASP.NET的三层架构(DAL,BLL,UI) BLL   是业务逻辑层   Business   Logic   Layer DAL   是数据访问层   Data   Access   Laye ...

  2. Android之ActionBar、Tabs、Fragment、ViewPager实现标签页切换并缓存页面

    感觉 Android 到处都是坑,每个地方都要把人折腾半天. 今天来简单说说 Android之ActionBar.Tabs.Fragment.ViewPager 实现标签页切换并缓存页面 关于他们的介 ...

  3. hdu1010

    #include <stdio.h>#include <string.h>#include <math.h> int n,m,t;char map[10][10]; ...

  4. Sass入门:第四章

    1.加法 加法运算是Sass中运算的一种,在变量或属性中都可以做加法运算.如: .box { width: 20px + 8in; } 编译出来的CSS: .box { width: 788px; } ...

  5. MongoDB数据模型(一)

    原文地址 一.数据模型介绍 MongoDB中的数据有着灵活的架构.与SQL数据库不同,因为SQL数据库必须先定义表结构,然后才能向其中插入数据,而MongoDB的集合不强制任何文档结构.这个灵活性方便 ...

  6. Java I/O 操作的一些基本知识

    1.文件类:File ,也是唯一的单独的文件类.可以对文件进行操作.其方法有:exists(),delete(),isDirectory(),createNewFile(),getName(),get ...

  7. 再次深入 C# Attribute

    了解attribute Attribute 只是将一些附加信息与某个目标元素关联起来的方式. Attribute 是一个类,这个类可以提供一些字段和属性,不应提供公共方法,事件等.在定义attribu ...

  8. 杭电21题 Palindrome

    Problem Description A palindrome is a symmetrical string, that is, a string read identically from le ...

  9. struts2 result type的类型

    一共十种类型 1.dispatcher 默认的类型,相当于servlet的foward,服务器端跳转.客户端看到的是struts2中配置的地址,而不是真正页面的地址.一般用于跳转到jsp页面 2.re ...

  10. do循环的100米自由落体

    #include "stdio.h" void main() { float h=100.0,sum=100.0; ; do { sum=sum+h; h=h/; g++; }); ...