downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/wrappers.compression.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/wrappers.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'wrappers.compression.php',
   
1 => 'Compression Streams',
  ),
 
'up' =>
  array (
   
0 => 'wrappers.php',
   
1 => 'List of Supported Protocols/Wrappers',
  ),
 
'prev' =>
  array (
   
0 => 'wrappers.php.php',
   
1 => 'PHP input/output streams',
  ),
 
'next' =>
  array (
   
0 => 'wrappers.data.php',
   
1 => 'Data (RFC 2397)',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="wrappers.compression" class="section">
  <h2 class="title">Compression Streams</h2>
  <p class="simpara"><var class="filename">zlib:</var> PHP 4.0.4 - PHP 4.2.3 (systems with fopencookie only)</p>
  <p class="simpara"><var class="filename">compress.zlib://</var> and <var class="filename">compress.bzip2://</var> PHP 4.3.0 and up</p>

  <ul class="itemizedlist">
   <li class="listitem"><span class="simpara"><var class="filename">zlib:</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">compress.zlib://</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">compress.bzip2://</var></span></li>
  </ul>

  <p class="simpara">
   <var class="filename">zlib:</var> works like <a href="function.gzopen.php" class="function">gzopen()</a>, except that the
   stream can be used with <a href="function.fread.php" class="function">fread()</a> and the other
   filesystem functions.  This is deprecated as of PHP 4.3.0 due
   to ambiguities with filenames containing &#039;:&#039; characters; use
   <var class="filename">compress.zlib://</var> instead.
  </p>

  <p class="simpara">
   <var class="filename">compress.zlib://</var> and
   <var class="filename">compress.bzip2://</var> are equivalent to
   <a href="function.gzopen.php" class="function">gzopen()</a> and <a href="function.bzopen.php" class="function">bzopen()</a>
   respectively, and operate even on systems that do not support
   fopencookie.
  </p>
  <p class="para">
   </p><table class="doctable table">
    <caption><b>Wrapper Summary</b></caption>
   
     <thead valign="middle">
      <tr valign="middle">
       <th>Attribute</th>
       <th>Supported</th>
      </tr>

     </thead>

     <tbody valign="middle" class="tbody">
      <tr valign="middle">
       <td align="left">Restricted by <a href="filesystem.configuration.php#ini.allow-url-fopen" class="link">allow_url_fopen</a></td>
       <td align="left">No</td>
      </tr>

      <tr valign="middle">
       <td align="left">Allows Reading</td>
       <td align="left">Yes</td>
      </tr>

      <tr valign="middle">
       <td align="left">Allows Writing</td>
       <td align="left">Yes</td>
      </tr>

      <tr valign="middle">
       <td align="left">Allows Appending</td>
       <td align="left">Yes</td>
      </tr>

      <tr valign="middle">
       <td align="left">Allows Simultaneous Reading and Writing</td>
       <td align="left">No</td>
      </tr>

      <tr valign="middle">
       <td align="left">Supports <a href="function.stat.php" class="function">stat()</a></td>
       <td align="left">
        No, use the normal <i>file://</i> wrapper
        to stat compressed files.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left">Supports <a href="function.unlink.php" class="function">unlink()</a></td>
       <td align="left">
        No, use the normal <i>file://</i> wrapper
        to unlink compressed files.
       </td>
      </tr>

      <tr valign="middle">
       <td align="left">Supports <a href="function.rename.php" class="function">rename()</a></td>
       <td align="left">No</td>
      </tr>

      <tr valign="middle">
       <td align="left">Supports <a href="function.mkdir.php" class="function">mkdir()</a></td>
       <td align="left">No</td>
      </tr>

      <tr valign="middle">
       <td align="left">Supports <a href="function.rmdir.php" class="function">rmdir()</a></td>
       <td align="left">No</td>
      </tr>

     </tbody>
   
   </table>
<p>
  </p>
  <p class="para">
   <a href="book.zip.php" class="link">ZIP extension</a> registers <var class="filename">zip:</var> wrapper.
  </p>
 </div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites