PHP Common Commands

Source: Internet
Author: User
Tags ini php file version zend

1.php-v View version number

[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 View Help


3.php-m to view installed modules

[Root@rs-2 lib]# Php-m

[PHP Modules]

Core

Type


4.php-i View php information (see php.ini very convenient)

[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 Display configuration file name

[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 Execute PHP file

[Root@rs-2 phptest]# php-f helloworld.php

Helloword


For more tips, see php-h.

[Root@rs-2 ~]# Php-h

usage:php [Options] [f] [--] [args ...]

PHP [Options]-R [--] [args...]

PHP [Options] [-B ] [-E ] [--] [args...] -R

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 would 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 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 .





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.