Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 1503

php-manual-en-7.2.11-1.mga7.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>Zip context option listing</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="context.params.html">Context parameters</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="wrappers.html">Supported Protocols and Wrappers</a></div>
 <div class="up"><a href="context.html">Context options and parameters</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="context.zip" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Zip context options</h1>
  <p class="refpurpose"><span class="refname">Zip context options</span> &mdash; <span class="dc-title">Zip context option listing</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-context.zip-description">
  <h3 class="title">Description</h3>
  <p class="para">
   Zip context options are available for <em>zip</em> wrappers.
  </p>
 </div>

 
 <div class="refsect1 options" id="refsect1-context.zip-options">
  <h3 class="title">Options</h3>
  <p class="para">
   <dl>

    
     <dt id="context.zip.password"><code class="parameter">password</code></dt>

     <dd>

      <p class="para">
       Used to specify password used for encrypted archive.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 
 <div class="refsect1 changelog" id="refsect1-context.zip-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>PHP 7.2.0, PECL zip 1.14.0</td>
       <td>
        Added <code class="parameter">password</code>.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-context.zip-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="iteratoraggregate.example.basic">
    <p><strong>Example #1 Basic <code class="parameter">password</code> usage 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;Read&nbsp;encrypted&nbsp;archive<br /></span><span style="color: #0000BB">$opts&nbsp;</span><span style="color: #007700">=&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'zip'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'password'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">'secret'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;),<br />);<br /></span><span style="color: #FF8000">//&nbsp;create&nbsp;the&nbsp;context...<br /></span><span style="color: #0000BB">$context&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">stream_context_create</span><span style="color: #007700">(</span><span style="color: #0000BB">$opts</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;...and&nbsp;use&nbsp;it&nbsp;to&nbsp;fetch&nbsp;the&nbsp;data<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">file_get_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">'zip://test.zip#test.txt'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$context</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

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

 
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="context.params.html">Context parameters</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="wrappers.html">Supported Protocols and Wrappers</a></div>
 <div class="up"><a href="context.html">Context options and parameters</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>