Home > Article > Backend Development > Introduction to the method of PHP function ini_get_all to obtain setting option variables_PHP tutorial
For beginnersReturn all option values in the form of an array, which is convenient for you to use when phpinfo() cannot be used.
Manual example of PHP function ini_get_all, such as:
<ol class="dp-xml"><li class="alt"><span><span class="tag"><</span><span> ?php </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></span></li></ol>
Partial output:
<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>
The above is the relevant usage of the PHP function ini_get_all. I hope it will be helpful to everyone.