<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.phar.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'phar.mungserver.php',
    1 => 'Phar::mungServer',
    2 => 'Defines a list of up to 4 $_SERVER variables that should be modified for execution',
  ),
  'up' => 
  array (
    0 => 'class.phar.php',
    1 => 'Phar',
  ),
  'prev' => 
  array (
    0 => 'phar.mount.php',
    1 => 'Phar::mount',
  ),
  'next' => 
  array (
    0 => 'phar.offsetexists.php',
    1 => 'Phar::offsetExists',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/phar/Phar/mungServer.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="phar.mungserver" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Phar::mungServer</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8, PECL phar &gt;= 2.0.0)</p><p class="refpurpose"><span class="refname">Phar::mungServer</span> &mdash; <span class="dc-title">Defines a list of up to 4 $_SERVER variables that should be modified for execution</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-phar.mungserver-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">final</span> <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><strong>Phar::mungServer</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$variables</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>Phar::mungServer()</strong></span> should only be called within the
   stub of a phar archive.
  </p>
  <p class="para">
   Defines a list of up to 4 <var class="varname"><a href="reserved.variables.server.php" class="classname">$_SERVER</a></var> variables that should be
   modified for execution.
   Variables that can be modified to remove traces of phar execution are
   <code class="literal">REQUEST_URI</code>, <code class="literal">PHP_SELF</code>,
   <code class="literal">SCRIPT_NAME</code> and <code class="literal">SCRIPT_FILENAME</code>.
  </p>
  <p class="para">
   On its own, this method does nothing.  Only when combined with
   <span class="function"><a href="phar.webphar.php" class="function">Phar::webPhar()</a></span> does it take effect, and only when the requested
   file is a PHP file to be parsed.  Note that the
   <code class="literal">PATH_INFO</code> and <code class="literal">PATH_TRANSLATED</code> variables
   are always modified.
  </p>
  <p class="para">
   The original values of variables that are modified are stored in the SERVER
   array with <code class="literal">PHAR_</code> prepended, so for instance
   <code class="literal">SCRIPT_NAME</code> would be saved as <code class="literal">PHAR_SCRIPT_NAME</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-phar.mungserver-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">variables</code></dt>
     <dd>
      <p class="para">
       An array of any of the strings
       <code class="literal">REQUEST_URI</code>, <code class="literal">PHP_SELF</code>,
       <code class="literal">SCRIPT_NAME</code> and <code class="literal">SCRIPT_FILENAME</code>.
       Other values trigger an exception, and <span class="function"><strong>Phar::mungServer()</strong></span>
       is case-sensitive.
      </p>
     </dd>
    
   </dl>
  </p>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-phar.mungserver-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   No return.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-phar.mungserver-errors">
  <h3 class="title">Fehler/Exceptions</h3>
  <p class="para">
   Throws <span class="classname"><a href="class.unexpectedvalueexception.php" class="classname">UnexpectedValueException</a></span> if any problems are
   found with the passed in data.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-phar.mungserver-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 A <span class="function"><strong>Phar::mungServer()</strong></span> example</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: #FF8000">// example stub<br /></span><span style="color: #0000BB">Phar</span><span style="color: #007700">::</span><span style="color: #0000BB">mungServer</span><span style="color: #007700">(array(</span><span style="color: #DD0000">'REQUEST_URI'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">Phar</span><span style="color: #007700">::</span><span style="color: #0000BB">webPhar</span><span style="color: #007700">();<br />__HALT_COMPILER();<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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


 <div class="refsect1 seealso" id="refsect1-phar.mungserver-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="phar.webphar.php" class="function" rel="rdfs-seeAlso">Phar::webPhar()</a> - Routes a request from a web browser to an internal file within the phar archive</span></li>
    <li><span class="function"><a href="phar.setstub.php" class="function" rel="rdfs-seeAlso">Phar::setStub()</a> - Used to set the PHP loader or bootstrap stub of a Phar archive</span></li>
   </ul>
  </p>
 </div>


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