<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.apache.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.apache-setenv.php',
    1 => 'apache_setenv',
    2 => 'Set an Apache subprocess_env variable',
  ),
  'up' => 
  array (
    0 => 'ref.apache.php',
    1 => 'Apache Функції',
  ),
  'prev' => 
  array (
    0 => 'function.apache-response-headers.php',
    1 => 'apache_response_headers',
  ),
  'next' => 
  array (
    0 => 'function.getallheaders.php',
    1 => 'getallheaders',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/apache/functions/apache-setenv.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.apache-setenv" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">apache_setenv</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">apache_setenv</span> &mdash; <span class="dc-title">Set an Apache subprocess_env variable</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.apache-setenv-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>apache_setenv</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$variable</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$value</code></span>, <span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$walk_to_top</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong></span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>apache_setenv()</strong></span> sets the value of the Apache
   environment variable specified by
   <code class="parameter">variable</code>.
  </p>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
   <p class="para">
    When setting an Apache environment variable, the corresponding 
    <var class="varname"><a href="reserved.variables.server.php" class="classname">$_SERVER</a></var>
    variable is not changed.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.apache-setenv-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">variable</code></dt>
     <dd>
      <p class="para">
       The environment variable that&#039;s being set.
      </p>
     </dd>
    
    
     <dt><code class="parameter">value</code></dt>
     <dd>
      <p class="para">
       The new <code class="parameter">variable</code> value.
      </p>
     </dd>
    
    
     <dt><code class="parameter">walk_to_top</code></dt>
     <dd>
      <p class="para">
       Whether to set the top-level variable available to all Apache layers.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.apache-setenv-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Повертає <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> у разі успіху або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.apache-setenv-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
   <p><strong>Приклад #1 Setting an Apache environment variable using <span class="function"><strong>apache_setenv()</strong></span></strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />apache_setenv</span><span style="color: #007700">(</span><span style="color: #DD0000">"EXAMPLE_VAR"</span><span style="color: #007700">, </span><span style="color: #DD0000">"Example Value"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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


 <div class="refsect1 notes" id="refsect1-function.apache-setenv-notes">
  <h3 class="title">Примітки</h3>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
   <p class="para">
    <span class="function"><strong>apache_setenv()</strong></span> can be paired up with
    <span class="function"><a href="function.apache-getenv.php" class="function">apache_getenv()</a></span> across separate pages or for setting
    variables to pass to Server Side Includes (.shtml) that have been
    included in PHP scripts.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.apache-setenv-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.apache-getenv.php" class="function" rel="rdfs-seeAlso">apache_getenv()</a> - Get an Apache subprocess_env variable</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>