Rumah >pembangunan bahagian belakang >tutorial php >PHP函数ini_get_all获取设置选项变量的方法介绍_PHP教程
对于初学把所有选项值以数组的形式返回,方便你当phpinfo()无法使用的时候来使用。
PHP函数ini_get_all的手册例子,比如:
<ol class="dp-xml"> <li class="alt"><span><span class="tag"><span> ?php </span></span></span></li> <li> <span>$</span><span class="attribute">inis</span><span> = </span><span class="attribute-value">ini_get_all</span><span>(); </span> </li> <li class="alt"><span>print_r($inis); </span></li> <li> <span class="tag">?></span><span> </span> </li> </ol>
部分输出:
<ol class="dp-xml"> <li class="alt"><span><span>Array </span></span></li> <li><span>( </span></li> <li class="alt"> <span>[allow_call_time_pass_<br>reference] =</span><span class="tag">></span><span> Array </span> </li> <li><span>( </span></li> <li class="alt"> <span>[global_value] =</span><span class="tag">></span><span> 1 </span> </li> <li> <span>[local_value] =</span><span class="tag">></span><span> 1 </span> </li> <li class="alt"> <span>[access] =</span><span class="tag">></span><span> 6 </span> </li> <li><span>) </span></li> <li class="alt"> <span>[allow_url_fopen] =</span><span class="tag">></span><span> Array </span> </li> <li><span>( </span></li> <li class="alt"> <span>[global_value] =</span><span class="tag">></span><span> 1 </span> </li> <li> <span>[local_value] =</span><span class="tag">></span><span> 1 </span> </li> <li class="alt"> <span>[access] =</span><span class="tag">></span><span> 7 </span> </li> <li><span>) </span></li> <li class="alt"><span>… </span></li> <li><span>) </span></li> </ol>
以上就是PHP函数ini_get_all的相关使用方法,希望对大家有所帮助。