function.bzopen.html 4.8 KB
<!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>&Ouml;ffnet eine bzip2-komprimierte Datei</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.bzflush.html">bzflush</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.bzread.html">bzread</a></div>
 <div class="up"><a href="ref.bzip2.html">Bzip2 Funktionen</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.bzopen" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">bzopen</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.4, PHP 5)</p><p class="refpurpose"><span class="refname">bzopen</span> &mdash; <span class="dc-title">Öffnet eine bzip2-komprimierte Datei</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.bzopen-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">resource</span> <span class="methodname"><strong>bzopen</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$mode</code></span>
   )</div>

  <p class="para rdfs-comment">
   Öffnet eine bzip2-Datei (.bz2) zum Lesen oder Schreiben.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.bzopen-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">filename</code></dt>

     <dd>

      <p class="para">
       Name der zu öffnenden Datei.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">mode</code></dt>

     <dd>

      <p class="para">
       Ähnlich zur Funktion <span class="function"><a href="function.fopen.html" class="function">fopen()</a></span> wird &#039;r&#039; für
       lesenden und &#039;w&#039; für schreibenden Zugriff unterstützt. Andere
       Werte führen dazu, daß bzopen <strong><code>FALSE</code></strong> zurückgibt.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.bzopen-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Wenn das Öffnen fehlschlägt, gibt <span class="function"><strong>bzopen()</strong></span>
   <strong><code>FALSE</code></strong> zurück, andernfalls wird ein Zeiger auf die geöffnete
   Datei zurückgegeben.
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.bzopen-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-615">
    <p><strong>Beispiel #1 <span class="function"><strong>bzopen()</strong></span>-Beispiel</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$file&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"/tmp/foo.bz2"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$bz&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">bzopen</span><span style="color: #007700">(</span><span style="color: #0000BB">$file</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"r"</span><span style="color: #007700">)&nbsp;or&nbsp;die(</span><span style="color: #DD0000">"</span><span style="color: #0000BB">$file</span><span style="color: #DD0000">&nbsp;konnte&nbsp;nicht&nbsp;zum&nbsp;Lesen&nbsp;geöffnet&nbsp;werden"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">bzclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$bz</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

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

 <div class="refsect1 seealso" id="refsect1-function.bzopen-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.bzclose.html" class="function" rel="rdfs-seeAlso">bzclose()</a> - Schlie&szlig;t eine bzip2-Datei</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="function.bzflush.html">bzflush</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.bzread.html">bzread</a></div>
 <div class="up"><a href="ref.bzip2.html">Bzip2 Funktionen</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>