downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.get-cfg-var.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.info.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.get-cfg-var.php',
   
1 => 'get_cfg_var',
  ),
 
'up' =>
  array (
   
0 => 'ref.info.php',
   
1 => 'PHP Options/Info Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.gc-enabled.php',
   
1 => 'gc_enabled',
  ),
 
'next' =>
  array (
   
0 => 'function.get-current-user.php',
   
1 => 'get_current_user',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.get-cfg-var" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">get_cfg_var</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">get_cfg_var</span> &mdash; <span class="dc-title">Gets the value of a PHP configuration option</span></p>

 </div>
 
 <a name="function.get-cfg-var.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><b>get_cfg_var</b></span>
    ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$option</tt></span>
   )</div>

  <p class="para rdfs-comment">
   Gets the value of a PHP configuration <i><tt class="parameter">option</tt></i>
.
  </p>
  <p class="para">
   This function will not return configuration information set when the PHP
   was compiled, or read from an Apache configuration file.
  </p>
  <p class="para">
   To check whether the system is using a <a href="configuration.file.php" class="link">configuration file</a>, try retrieving the
   value of the cfg_file_path configuration setting. If this is available, a
   configuration file is being used.
  </p>
 </div>


 <a name="function.get-cfg-var.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">option</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The configuration option name.
      </p>
     </dd>

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


 <a name="function.get-cfg-var.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the current value of the PHP configuration variable specified by
   <i><tt class="parameter">option</tt></i>
, or <b><tt class="constant">FALSE</tt></b> if an error occurs.
  </p>
 </div>


 <a name="function.get-cfg-var.changelog"></a><div class="refsect1 changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   </p><table class="doctable informaltable">
   
     <thead valign="middle">
      <tr valign="middle">
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody valign="middle" class="tbody">
      <tr valign="middle">
       <td align="left">5.3.0</td>
       <td align="left">
        <b>get_cfg_var()</b> was fixed to be able
        to return &quot;array&quot; ini options.
       </td>
      </tr>

     </tbody>
   
   </table>
<p>
  </p>
 </div>


 <a name="function.get-cfg-var.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="function.ini-get.php" class="function" rel="rdfs-seeAlso">ini_get()</a> - Gets the value of a configuration option</li>
    <li class="member"><a href="function.ini-get-all.php" class="function" rel="rdfs-seeAlso">ini_get_all()</a> - Gets all configuration options</li>
   </ul><p>
  </p>
 </div>


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites