(PHP 4, PHP 5, PHP 7)
phpinfo — 锟斤拷锟斤拷锟斤拷锟� PHP 锟斤拷锟矫碉拷锟斤拷息
$what
= INFO_ALL
] ) : bool锟斤拷锟� PHP 锟斤拷前状态锟侥达拷锟斤拷锟斤拷息锟斤拷锟斤拷锟斤拷锟斤拷 PHP 锟斤拷锟斤拷选锟筋、锟斤拷锟矫碉拷锟斤拷展锟斤拷PHP 锟芥本锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷息锟酵伙拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟轿伙拷锟侥o拷锟侥伙拷锟斤拷锟斤拷PHP锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷系统锟芥本锟斤拷息锟斤拷path 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷选锟斤拷谋锟斤拷锟街碉拷锟斤拷锟街碉拷锟紿TTP 头锟斤拷PHP锟斤拷权锟斤拷息(License)锟斤拷
锟斤拷为每锟斤拷系统锟斤拷装锟斤拷锟斤拷锟斤拷锟斤拷同锟斤拷phpinfo() 锟斤拷锟斤拷锟斤拷锟斤拷系统锟较硷拷锟� 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 预锟斤拷锟斤拷锟斤拷锟�锟斤拷
phpinfo() 同时锟角革拷锟斤拷锟叫硷拷值锟侥★拷锟斤拷锟斤拷锟斤拷锟斤拷 EGPCS(Environment, GET, POST, Cookie, Server) 锟斤拷锟捷的碉拷锟皆癸拷锟竭★拷
what
锟斤拷锟斤拷锟斤拷锟斤拷锟铰碉拷一锟斤拷锟斤拷锟斤拷 constants 锟斤拷位锟斤拷锟姐传锟捷革拷锟斤拷选锟斤拷 what
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟较拷锟�
锟矫诧拷锟斤拷锟斤拷锟皆把筹拷锟斤拷锟斤拷踊锟斤拷锟斤拷锟� or 锟斤拷锟斤拷锟斤拷锟斤拷位锟斤拷锟姐。
Name (constant) | Value | Description |
---|---|---|
INFO_GENERAL | 1 | 锟斤拷锟矫碉拷锟斤拷锟斤拷锟叫★拷 php.ini 锟斤拷锟侥硷拷位锟矫★拷锟斤拷锟斤拷锟斤拷时锟戒、Web 锟斤拷锟斤拷锟斤拷锟斤拷系统锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷息锟斤拷 |
INFO_CREDITS | 2 | PHP 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟轿硷拷 phpcredits()锟斤拷 |
INFO_CONFIGURATION | 4 | 锟斤拷前PHP指锟斤拷谋锟斤拷锟街碉拷锟斤拷锟街碉拷锟斤拷渭锟� ini_get()锟斤拷 |
INFO_MODULES | 8 | 锟窖硷拷锟截碉拷模锟斤拷锟侥o拷锟斤拷锟接︼拷锟斤拷锟斤拷谩锟斤拷渭锟� get_loaded_extensions()锟斤拷 |
INFO_ENVIRONMENT | 16 | 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷息也锟斤拷锟斤拷锟斤拷 $_ENV 锟斤拷取锟斤拷 |
INFO_VARIABLES | 32 | 锟斤拷示锟斤拷锟斤拷锟斤拷锟斤拷 EGPCS (Environment, GET, POST, Cookie, Server) 锟斤拷 预锟斤拷锟斤拷锟斤拷锟�锟斤拷 |
INFO_LICENSE | 64 | PHP锟斤拷锟街わ拷锟较拷锟斤拷渭锟� » license FAQ锟斤拷 |
INFO_ALL | -1 | 锟斤拷示锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷息锟斤拷 |
锟缴癸拷时锟斤拷锟斤拷 TRUE
锟斤拷 锟斤拷锟斤拷锟斤拷失锟斤拷时锟斤拷锟斤拷 FALSE
锟斤拷
5.5.0 | Logo GUIDs were replaced with data URIs, and so turning off expose_php now has no effect on the result of phpinfo(). Credits are also now embedded within the output itself instead of linked. |
---|---|
锟芥本 | 说锟斤拷 |
5.2.2 | 锟斤拷锟斤拷锟斤拷"锟窖硷拷锟截碉拷锟斤拷锟斤拷锟侥硷拷"锟斤拷息锟斤拷之前只锟斤拷锟斤拷"锟斤拷锟斤拷锟侥硷拷路锟斤拷(php.ini)"锟斤拷 |
Example #1 phpinfo() 锟斤拷锟斤拷
<?php
// 锟斤拷示锟斤拷锟斤拷锟斤拷息锟斤拷默锟斤拷锟斤拷示 INFO_ALL
phpinfo();
// Show just the module information. 锟斤拷锟斤拷锟斤拷示PHP模锟斤拷锟斤拷息锟斤拷
// phpinfo(8) 锟斤拷锟斤拷同锟斤拷锟侥斤拷锟斤拷锟�
phpinfo(INFO_MODULES);
?>
Note:
锟斤拷 PHP 5.5 之前锟芥本锟斤拷锟斤拷 expose_php 锟斤拷锟斤拷为 off 锟斤拷锟皆斤拷锟斤拷一锟斤拷锟斤拷锟斤拷息锟斤拷 锟斤拷锟斤拷锟斤拷锟� PHP 锟斤拷 Zend 锟斤拷 logo锟斤拷锟皆硷拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
Note:
锟斤拷锟斤拷锟斤拷锟叫o拷CLI锟斤拷模式锟斤拷 phpinfo() 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷谋锟斤拷锟斤拷锟斤拷锟斤拷锟紿TML锟斤拷