Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 5362

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!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>Return a list of .ini files parsed from the additional ini dir</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.php-ini-loaded-file.html">php_ini_loaded_file</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.php-logo-guid.html">php_logo_guid</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.php-ini-scanned-files" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">php_ini_scanned_files</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5)</p><p class="refpurpose"><span class="refname">php_ini_scanned_files</span> &mdash; <span class="dc-title">Return a list of .ini files parsed from the additional ini dir</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.php-ini-scanned-files-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>php_ini_scanned_files</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
    <span class="function"><strong>php_ini_scanned_files()</strong></span> returns a comma-separated
   list of configuration files parsed after <var class="filename">php.ini</var>.  These files are
   found in a directory defined by the
   <strong class="option configure">--with-config-file-scan-dir</strong>
 option
   which is set during compilation.
  </p>
  <p class="para">
   The returned configuration files also include the path as declared in
   the <strong class="option configure">--with-config-file-scan-dir</strong>

   option.
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.php-ini-scanned-files-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns a comma-separated string of .ini files on success. Each comma is
   followed by a newline. If the directive <strong class="option configure">--with-config-file-scan-dir</strong>
 wasn&#039;t set,
   <strong><code>FALSE</code></strong> is returned.  If it was set and the directory was empty, an
   empty string is returned.  If a file is unrecognizable, the file will
   still make it into the returned string but a PHP error will also result.
   This PHP error will be seen both at compile time and while using
    <span class="function"><strong>php_ini_scanned_files()</strong></span>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.php-ini-scanned-files-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-506">
    <p><strong>Example #1 A simple example to list the returned ini files</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">$filelist&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">php_ini_scanned_files</span><span style="color: #007700">())&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">$filelist</span><span style="color: #007700">)&nbsp;&gt;&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$files&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">','</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$filelist</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;(</span><span style="color: #0000BB">$files&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">$file</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;li&gt;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">trim</span><span style="color: #007700">(</span><span style="color: #0000BB">$file</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"&lt;/li&gt;\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.php-ini-scanned-files-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.ini-set.html" class="function" rel="rdfs-seeAlso">ini_set()</a> - Sets the value of a configuration option</span></li>
    <li class="member"> <span class="function"><a href="function.phpinfo.html" class="function" rel="rdfs-seeAlso">phpinfo()</a> - Outputs information about PHP's configuration</span></li>
    <li class="member"> <span class="function"><a href="function.php-ini-loaded-file.html" class="function" rel="rdfs-seeAlso">php_ini_loaded_file()</a> - Retrieve a path to the loaded php.ini file</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.php-ini-loaded-file.html">php_ini_loaded_file</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.php-logo-guid.html">php_logo_guid</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>