📄 function.ini-get-all.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Gets all configuration options</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.ini-alter.html">ini_alter</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ini-get.html">ini_get</a></div> <div class="up"><a href="ref.info.html">PHP Options/Info Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><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)</p><p class="refpurpose"><span class="refname">ini_get_all</span> — <span class="dc-title">Gets all configuration options</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">array</span> <span class="methodname"><b><b>ini_get_all</b></b></span> ([ <span class="methodparam"><span class="type">string</span> <tt class="parameter">$extension</tt></span> [, <span class="methodparam"><span class="type">bool</span> <tt class="parameter">$details</tt></span> ]] )</div> <p class="para rdfs-comment"> Returns all the registered configuration options. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><i><tt class="parameter">extension</tt></i></span> <dd> <p class="para"> An optional extension name. If set, the function return only options specific for that extension. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">details</tt></i></span> <dd> <p class="para"> Retrieve details settings or only the current value for each setting. Default is <b><tt>TRUE</tt></b> (retrieve details). </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns an associative array with directive name as the array key. </p> <p class="para"> When <i><tt class="parameter">details</tt></i> is <b><tt>TRUE</tt></b> (default) the array will contain <i>global_value</i> (set in <var class="filename">php.ini</var>), <i>local_value</i> (perhaps set with <a href="function.ini-set.html" class="function">ini_set()</a> or <var class="filename">.htaccess</var>), and <i>access</i> (the access level). </p> <p class="para"> When <i><tt class="parameter">details</tt></i> is <b><tt>FALSE</tt></b> the value will be the current value of the option. </p> <p class="para"> See the manual section for information on what access levels mean. </p> <blockquote><p><b class="note">Note</b>: It's possible for a directive to have multiple access levels, which is why <i>access</i> shows the appropriate bitmask values. <br /> </p></blockquote> </div> <div class="refsect1 changelog"> <h3 class="title">ChangeLog</h3> <p class="para"> <table class="informaltable"> <colgroup> <thead valign="middle"> <tr valign="middle"> <th colspan="1">Version</th> <th colspan="1">Description</th> </tr> </thead> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">5.3.0</td> <td colspan="1" rowspan="1" align="left"> Added <i><tt class="parameter">details</tt></i>. </td> </tr> </tbody> </colgroup> </table> </p> </div> <div class="refsect1 examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example"> <p><b>Example #1 <b>ini_get_all()</b> examples</b></p> <div class="example-contents"><div class="phpcode"><code><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></code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents"><pre><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> </pre></div> </div> <div class="example"> <p><b>Example #2 Disabling <i><tt class="parameter">details</tt></i></b></p> <div class="example-contents"><div class="phpcode"><code><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></code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents"><pre><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> </pre></div> </div> </p> </div> <div class="refsect1 seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="configuration.changes.html" class="xref">How to change configuration settings</a></li> <li class="member"><a href="function.ini-get.html" class="function" rel="rdfs-seeAlso">ini_get()</a></li> <li class="member"><a href="function.ini-restore.html" class="function" rel="rdfs-seeAlso">ini_restore()</a></li> <li class="member"><a href="function.ini-set.html" class="function" rel="rdfs-seeAlso">ini_set()</a></li> <li class="member"><a href="function.get-loaded-extensions.html" class="function" rel="rdfs-seeAlso">get_loaded_extensions()</a></li> <li class="member"><a href="function.phpinfo.html" class="function" rel="rdfs-seeAlso">phpinfo()</a></li> </ul> </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.ini-alter.html">ini_alter</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ini-get.html">ini_get</a></div> <div class="up"><a href="ref.info.html">PHP Options/Info Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -