<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/context.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'context.zip.php',
    1 => 'Opciones de contexto Zip',
    2 => 'Listado de opciones de contexto Zip',
  ),
  'up' => 
  array (
    0 => 'context.php',
    1 => 'Opciones y par&aacute;metros de contexto',
  ),
  'prev' => 
  array (
    0 => 'context.params.php',
    1 => 'Contexto par&aacute;metros',
  ),
  'next' => 
  array (
    0 => 'context.zlib.php',
    1 => 'Opciones de contexto Zlib',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'language/context/zip.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="context.zip" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Opciones de contexto Zip</h1>
  <p class="refpurpose"><span class="refname">Opciones de contexto Zip</span> &mdash; <span class="dc-title">Listado de opciones de contexto Zip</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-context.zip-description">
  <h3 class="title">Descripción</h3>
  <p class="para">
   Las opciones de contexto Zip están disponibles para las envolturas (wrappers)
   <code class="literal">zip</code>.
  </p>
 </div>


 <div class="refsect1 options" id="refsect1-context.zip-options">
  <h3 class="title">Opciones</h3>
  <p class="para">
   <dl>
    
     <dt id="context.zip.password"><code class="parameter">password</code></dt>
     <dd>
      <p class="para">
       Utilizado para especificar una contraseña a utilizar para los archivos cifrados.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-context.zip-changelog">
  <h3 class="title">Historial de cambios</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Versión</th>
       <th>Descripción</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>7.2.0, PECL zip 1.14.0</td>
       <td>
        Adición del parámetro <code class="parameter">password</code>.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-context.zip-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="context.zip.example-password">
    <p><strong>Ejemplo #1 Ejemplo con una utilización simple del parámetro <code class="parameter">password</code></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">// Leer el archivo cifrado<br /></span><span style="color: #0000BB">$opts </span><span style="color: #007700">= array(<br />    </span><span style="color: #DD0000">'zip' </span><span style="color: #007700">=&gt; array(<br />        </span><span style="color: #DD0000">'password' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'secret'</span><span style="color: #007700">,<br />    ),<br />);<br /></span><span style="color: #FF8000">// crear el contexto...<br /></span><span style="color: #0000BB">$context </span><span style="color: #007700">= </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">// ...y utilizarlo para recuperar los datos<br /></span><span style="color: #007700">echo </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">, </span><span style="color: #0000BB">false</span><span style="color: #007700">, </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><?php manual_footer($setup); ?>