Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 10293

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>Defines a list of up to 4 $_SERVER variables that should be modified for execution</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="phar.mount.html">Phar::mount</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="phar.offsetexists.html">Phar::offsetExists</a></div>
 <div class="up"><a href="class.phar.html">Phar</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="phar.mungserver" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Phar::mungServer</h1>
  <p class="verinfo">(Unknown)</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">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">final</span> <span class="modifier">public</span> <span class="modifier">static</span> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>Phar::mungServer</strong></span>
    ( <span class="methodparam"><span class="type">array</span> <code class="parameter">$munglist</code></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"><var class="varname"><a href="reserved.variables.server.html" class="classname">$_SERVER</a></var></var> variables that should be
   modified for execution.
   Variables that can be modified to remove traces of phar execution are
   <em>REQUEST_URI</em>, <em>PHP_SELF</em>,
   <em>SCRIPT_NAME</em> and <em>SCRIPT_FILENAME</em>.
  </p>
  <p class="para">
   On its own, this method does nothing.  Only when combined with
    <span class="function"><a href="phar.webphar.html" 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
   <em>PATH_INFO</em> and <em>PATH_TRANSLATED</em> variables
   are always modified.
  </p>
  <p class="para">
   The original values of variables that are modified are stored in the SERVER
   array with <em>PHAR_</em> prepended, so for instance
   <em>SCRIPT_NAME</em> would be saved as <em>PHAR_SCRIPT_NAME</em>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-phar.mungserver-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">munglist</code></em></span>
     <dd>

      <p class="para">
       an array containing as string indices any of
       <em>REQUEST_URI</em>, <em>PHP_SELF</em>,
       <em>SCRIPT_NAME</em> and <em>SCRIPT_FILENAME</em>.
       Other values trigger an exception, and  <span class="function"><strong>Phar::mungServer()</strong></span>
       is case-sensitive.
      </p>
     </dd>

    </dt>

   </dl>

  </p>

 </div>

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


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


 <div class="refsect1 examples" id="refsect1-phar.mungserver-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-690">
    <p><strong>Example #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">//&nbsp;example&nbsp;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">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="phar.webphar.html" class="function" rel="rdfs-seeAlso">Phar::webPhar()</a> - mapPhar for web-based phars. front controller for web applications</span></li>
    <li class="member"> <span class="function"><a href="phar.setstub.html" 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><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="phar.mount.html">Phar::mount</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="phar.offsetexists.html">Phar::offsetExists</a></div>
 <div class="up"><a href="class.phar.html">Phar</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>