-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathphpinfo.xml
203 lines (193 loc) · 6.17 KB
/
phpinfo.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: f781803449007bb0e3a96c693e0eee067f7eb466 Maintainer: daijie Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<refentry xml:id="function.phpinfo" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>phpinfo</refname>
<refpurpose>输出关于 PHP 配置的信息</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>true</type><methodname>phpinfo</methodname>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>INFO_ALL</constant></initializer></methodparam>
</methodsynopsis>
<para>
输出 PHP 当前状态的大量信息,包含了 PHP 编译选项、启用的扩展、PHP 版本、服务器信息和环境变量(如果编译为一个模块的话)、PHP
环境变量、操作系统版本信息、path 变量、配置选项的本地值和主值、HTTP 头和PHP授权信息(License)。
</para>
<para>
因为每个系统安装得有所不同,<function>phpinfo</function> 常用于在系统上检查<link
linkend="configuration">配置设置</link>和<link
linkend="language.variables.predefined">预定义变量</link>。
</para>
<para>
<function>phpinfo</function> 同时是个很有价值的、包含所有 EGPCS(Environment、GET、POST、Cookie、Server) 数据的调试工具。
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>flags</parameter></term>
<listitem>
<para>
可以用以下的一个或多个 <emphasis>constants</emphasis> 用位运算传递给可选的 <parameter>flags</parameter> 参数来定制输出的信息。
该参数可以把常量相加或者用<link linkend="language.operators.bitwise">按位或</link>操作符按位运算。
</para>
<para>
<table>
<title><function>phpinfo</function> 选项</title>
<tgroup cols="3">
<thead>
<row>
<entry>Name (constant)</entry>
<entry>Value</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>INFO_GENERAL</entry>
<entry>1</entry>
<entry>
配置的命令行、&php.ini; 的文件位置、建立的时间、Web 服务器、系统及更多其他信息。
</entry>
</row>
<row>
<entry>INFO_CREDITS</entry>
<entry>2</entry>
<entry>
PHP 贡献者名单。参见 <function>phpcredits</function>。
</entry>
</row>
<row>
<entry>INFO_CONFIGURATION</entry>
<entry>4</entry>
<entry>
当前PHP指令的本地值和主值。参见 <function>ini_get</function>。
</entry>
</row>
<row>
<entry>INFO_MODULES</entry>
<entry>8</entry>
<entry>
已加载的模块和模块相应的设置。参见
<function>get_loaded_extensions</function>。
</entry>
</row>
<row>
<entry>INFO_ENVIRONMENT</entry>
<entry>16</entry>
<entry>
环境变量信息也可以用 <varname>$_ENV</varname> 获取。
</entry>
</row>
<row>
<entry>INFO_VARIABLES</entry>
<entry>32</entry>
<entry>
显示所有来自 EGPCS (Environment, GET,
POST, Cookie, Server) 的 <link linkend="language.variables.predefined">
预定义变量</link>。
</entry>
</row>
<row>
<entry>INFO_LICENSE</entry>
<entry>64</entry>
<entry>
PHP许可证信息。参见 <link
xlink:href="&url.php.license;">license FAQ</link>。
</entry>
</row>
<row>
<entry>INFO_ALL</entry>
<entry>-1</entry>
<entry>
显示以上所有信息。
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.true.always;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>phpinfo</function> 示例</title>
<programlisting role="php">
<![CDATA[
<?php
// 显示所有信息,默认显示 INFO_ALL
phpinfo();
// Show just the module information. 仅仅显示PHP模块信息,
// phpinfo(8) 返回同样的结果。
phpinfo(INFO_MODULES);
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<note>
<para>
在 PHP 5.5 之前版本,当 <link linkend="ini.expose-php">expose_php</link> 设置为 <literal>off</literal> 可以禁用一部分信息。
这包括了 PHP 和 Zend 的 logo,以及贡献者名单。
</para>
</note>
<note>
<para>
在命令行(CLI)模式下 <function>phpinfo</function> 仅会输出纯文本,而不是HTML。
</para>
</note>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>phpversion</function></member>
<member><function>phpcredits</function></member>
<member><function>ini_get</function></member>
<member><function>ini_set</function></member>
<member><function>get_loaded_extensions</function></member>
<member><link linkend="language.variables.predefined">预定义变量</link></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->