mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-17 21:16:57 +08:00
226 lines
8.4 KiB
HTML
226 lines
8.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
<title>获取所有配置选项</title>
|
||
</head>
|
||
<body class="docs"><div id="layout">
|
||
<div id="layout-content"><div id="function.ini-get-all" class="refentry">
|
||
<div class="refnamediv">
|
||
<h1 class="refname">ini_get_all</h1>
|
||
<p class="verinfo">(PHP 4 >= 4.2.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">ini_get_all</span> — <span class="dc-title">获取所有配置选项</span></p>
|
||
|
||
</div>
|
||
|
||
<div class="refsect1 description" id="refsect1-function.ini-get-all-description">
|
||
<h3 class="title">说明</h3>
|
||
<div class="methodsynopsis dc-description">
|
||
<span class="methodname"><strong>ini_get_all</strong></span>
|
||
([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$extension</code></span>
|
||
[, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$details</code><span class="initializer"> = true</span></span>
|
||
]] ) : <span class="type">array</span></div>
|
||
|
||
<p class="para rdfs-comment">
|
||
获取所有已注册的配置选项
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 parameters" id="refsect1-function.ini-get-all-parameters">
|
||
<h3 class="title">参数</h3>
|
||
<p class="para">
|
||
<dl>
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">extension</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
可选的扩展名称。如果设置了,此函数仅仅返回指定该扩展的选项。
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">details</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
获取详细设置或者仅仅是每个设置的当前值。 默认是 <strong><code>TRUE</code></strong>(获取详细信息)。
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
</dl>
|
||
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 returnvalues" id="refsect1-function.ini-get-all-returnvalues">
|
||
<h3 class="title">返回值</h3>
|
||
<p class="para">
|
||
返回一个关联数组,指令名称是数组的键。
|
||
</p>
|
||
<p class="para">
|
||
当 <code class="parameter">details</code> 为 <strong><code>TRUE</code></strong>(默认),数组会包含 <em>global_value</em>(<var class="filename">php.ini</var> 中的设置)、<em>local_value</em>(可能是 <span class="function"><a href="ini_set.html" class="function">ini_set()</a></span> 或 <var class="filename">.htaccess</var> 中的设置) 以及 <em>access</em>(访问级别)。
|
||
</p>
|
||
<p class="para">
|
||
当 <code class="parameter">details</code> 为 <strong><code>FALSE</code></strong>,这个值会是选项的当前值。
|
||
</p>
|
||
<p class="para">
|
||
参见<a href="configuration.changes.modes.html" class="link">手册章节</a>中访问级别含义的信息。
|
||
</p>
|
||
<blockquote class="note"><p><strong class="note">Note</strong>:
|
||
<p class="para">
|
||
指令可以有多个访问级别,这也是为什么 <em>access</em> 会显示适当的位掩码。
|
||
</p>
|
||
</p></blockquote>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 notes" id="refsect1-function.ini-get-all-notes">
|
||
<h3 class="title">注释</h3>
|
||
<blockquote class="note"><p><strong class="note">Note</strong>:
|
||
<p class="para">
|
||
<span class="function"><strong>ini_get_all()</strong></span> 忽略 "array" 的 ini 选项,例如
|
||
pdo.dsn.*。
|
||
</p>
|
||
</p></blockquote>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 changelog" id="refsect1-function.ini-get-all-changelog">
|
||
<h3 class="title">更新日志</h3>
|
||
<p class="para">
|
||
<table class="doctable informaltable">
|
||
|
||
<thead>
|
||
<tr>
|
||
<th>版本</th>
|
||
<th>说明</th>
|
||
</tr>
|
||
|
||
</thead>
|
||
|
||
<tbody class="tbody">
|
||
<tr>
|
||
<td>5.3.0</td>
|
||
<td>
|
||
增加参数 <code class="parameter">details</code>。
|
||
</td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
|
||
</table>
|
||
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 examples" id="refsect1-function.ini-get-all-examples">
|
||
<h3 class="title">范例</h3>
|
||
<p class="para">
|
||
<div class="example" id="example-512">
|
||
<p><strong>Example #1 <span class="function"><strong>ini_get_all()</strong></span> 例子</strong></p>
|
||
<div class="example-contents">
|
||
<div class="phpcode"><pre><span style="color: #000000">
|
||
<span style="color: #0000BB"><?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">ini_get_all</span><span style="color: #007700">(</span><span style="color: #DD0000">"pcre"</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">ini_get_all</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?></span>
|
||
</span>
|
||
</pre></div>
|
||
</div>
|
||
|
||
<div class="example-contents"><p>以上例程的输出类似于:</p></div>
|
||
<div class="example-contents screen">
|
||
<div class="cdata"><pre>
|
||
Array
|
||
(
|
||
[pcre.backtrack_limit] => Array
|
||
(
|
||
[global_value] => 100000
|
||
[local_value] => 100000
|
||
[access] => 7
|
||
)
|
||
|
||
[pcre.recursion_limit] => Array
|
||
(
|
||
[global_value] => 100000
|
||
[local_value] => 100000
|
||
[access] => 7
|
||
)
|
||
|
||
)
|
||
Array
|
||
(
|
||
[allow_call_time_pass_reference] => Array
|
||
(
|
||
[global_value] => 0
|
||
[local_value] => 0
|
||
[access] => 6
|
||
)
|
||
|
||
[allow_url_fopen] => Array
|
||
(
|
||
[global_value] => 1
|
||
[local_value] => 1
|
||
[access] => 4
|
||
)
|
||
|
||
...
|
||
|
||
)
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="example" id="example-513">
|
||
<p><strong>Example #2 禁用 <code class="parameter">details</code></strong></p>
|
||
<div class="example-contents">
|
||
<div class="phpcode"><pre><span style="color: #000000">
|
||
<span style="color: #0000BB"><?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">ini_get_all</span><span style="color: #007700">(</span><span style="color: #DD0000">"pcre"</span><span style="color: #007700">, </span><span style="color: #0000BB">false</span><span style="color: #007700">)); </span><span style="color: #FF8000">// Added in PHP 5.3.0<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">ini_get_all</span><span style="color: #007700">(</span><span style="color: #0000BB">null</span><span style="color: #007700">, </span><span style="color: #0000BB">false</span><span style="color: #007700">)); </span><span style="color: #FF8000">// Added in PHP 5.3.0<br /></span><span style="color: #0000BB">?></span>
|
||
</span>
|
||
</pre></div>
|
||
</div>
|
||
|
||
<div class="example-contents"><p>以上例程的输出类似于:</p></div>
|
||
<div class="example-contents screen">
|
||
<div class="cdata"><pre>
|
||
Array
|
||
(
|
||
[pcre.backtrack_limit] => 100000
|
||
[pcre.recursion_limit] => 100000
|
||
)
|
||
Array
|
||
(
|
||
[allow_call_time_pass_reference] => 0
|
||
[allow_url_fopen] => 1
|
||
...
|
||
)
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 seealso" id="refsect1-function.ini-get-all-seealso">
|
||
<h3 class="title">参见</h3>
|
||
<p class="para">
|
||
<ul class="simplelist">
|
||
<li class="member"><a href="configuration.changes.html" class="xref">怎样修改配置设定</a></li>
|
||
<li class="member"><span class="function"><a href="ini_get.html" class="function" rel="rdfs-seeAlso">ini_get()</a> - 获取一个配置选项的值</span></li>
|
||
<li class="member"><span class="function"><a href="ini_restore.html" class="function" rel="rdfs-seeAlso">ini_restore()</a> - 恢复配置选项的值</span></li>
|
||
<li class="member"><span class="function"><a href="ini_set.html" class="function" rel="rdfs-seeAlso">ini_set()</a> - 为一个配置选项设置值</span></li>
|
||
<li class="member"><span class="function"><a href="get_loaded_extensions.html" class="function" rel="rdfs-seeAlso">get_loaded_extensions()</a> - 返回所有编译并加载模块名的 array</span></li>
|
||
<li class="member"><span class="function"><a href="phpinfo.html" class="function" rel="rdfs-seeAlso">phpinfo()</a> - 输出关于 PHP 配置的信息</span></li>
|
||
<li class="member"><span class="methodname"><a href="reflectionextension.getinientries.html" class="methodname" rel="rdfs-seeAlso">ReflectionExtension::getINIEntries()</a> - 获取ini配置</span></li>
|
||
</ul>
|
||
</p>
|
||
</div>
|
||
|
||
|
||
</div></div></div></body></html> |