<?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 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.apache-setenv.php',
    1 => 'apache_setenv',
    2 => 'Setzt eine Apache-Subprocess_env-Variable',
  ),
  'up' => 
  array (
    0 => 'ref.apache.php',
    1 => 'Apache Funktionen',
  ),
  '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' => 'de',
    '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">Setzt eine Apache-Subprocess_env-Variable</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.apache-setenv-description">
  <h3 class="title">Beschreibung</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> setzt den Wert der
   Apache-Umgebungsvariable, die mit <code class="parameter">variable</code> angegeben
   wurde.
  </p>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <p class="para">
    Wenn eine Apache-Umgebungsvariable verändert wird, ändert sich die
    korrespondierende <var class="varname"><a href="reserved.variables.server.php" class="classname">$_SERVER</a></var>-Variable nicht.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.apache-setenv-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">variable</code></dt>
     <dd>
      <p class="para">
       Die neu zu setzende Umgebungsvariable.
      </p>
     </dd>
    
    
     <dt><code class="parameter">value</code></dt>
     <dd>
      <p class="para">
       Der neue Wert von <code class="parameter">variable</code>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">walk_to_top</code></dt>
     <dd>
      <p class="para">
       Legt fest, ob die gesetzte Toplevel-Variable für alle Apachelayer
       verfügbar gemacht werden soll.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.apache-setenv-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt bei Erfolg <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück. Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.apache-setenv-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
   <p><strong>Beispiel #1 Eine Apache-Umgebungsvariable mit <span class="function"><strong>apache_setenv()</strong></span>
    setzen</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">"BEISPIEL_VAR"</span><span style="color: #007700">, </span><span style="color: #DD0000">"Beispielwert"</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">Anmerkungen</h3>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
   <p class="para">
    <span class="function"><strong>apache_setenv()</strong></span> kann mit <span class="function"><a href="function.apache-getenv.php" class="function">apache_getenv()</a></span>
    über mehrere unabhängige Seiten hinweg kombiniert werden. Es ist außerdem
    möglich, Variablen zu setzen, die an in PHP-Skripte einzubindende Server
    Side Includes (SSI, .shtml) übergeben werden.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.apache-setenv-seealso">
  <h3 class="title">Siehe auch</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> - Liefert eine Apache-Subprocess_env-Variable</span></li>
   </ul>
  </p>
 </div>


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