<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.pgsql.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.pg-lo-read-all.php',
    1 => 'pg_lo_read_all',
    2 => 'Reads an entire large object and send straight to browser',
  ),
  'up' => 
  array (
    0 => 'ref.pgsql.php',
    1 => 'PostgreSQL Функції',
  ),
  'prev' => 
  array (
    0 => 'function.pg-lo-read.php',
    1 => 'pg_lo_read',
  ),
  'next' => 
  array (
    0 => 'function.pg-lo-seek.php',
    1 => 'pg_lo_seek',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/pgsql/functions/pg-lo-read-all.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.pg-lo-read-all" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">pg_lo_read_all</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">pg_lo_read_all</span> &mdash; <span class="dc-title">
   Reads an entire large object and send straight to browser
  </span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.pg-lo-read-all-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>pg_lo_read_all</strong></span>(<span class="methodparam"><span class="type"><a href="class.pgsql-lob.php" class="type PgSql\Lob">PgSql\Lob</a></span> <code class="parameter">$lob</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>pg_lo_read_all()</strong></span> reads a large object and passes
   it straight through to the browser after sending all pending
   headers. Mainly intended for sending binary data like images or
   sound.
  </p>
  <p class="para">
   To use the large object interface, it is necessary to
   enclose it within a transaction block.
  </p>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
   <p class="para">
    This function used to be called <span class="function"><strong>pg_loreadall()</strong></span>.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.pg-lo-read-all-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">lob</code></dt>
     <dd>
      <p class="para">Примірник
<span class="classname"><a href="class.pgsql-lob.php" class="classname">PgSql\Lob</a></span>, якого повертає
<span class="function"><a href="function.pg-lo-open.php" class="function">pg_lo_open()</a></span>.</p>
     </dd>
    

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


 <div class="refsect1 returnvalues" id="refsect1-function.pg-lo-read-all-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Number of bytes read.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.pg-lo-read-all-changelog">
  <h3 class="title">Журнал змін</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Версія</th>
      <th>Опис</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.1.0</td>
 <td>
  Тепер параметр <code class="parameter">lob</code> має бути примірником
  <span class="classname"><a href="class.pgsql-lob.php" class="classname">PgSql\Lob</a></span>. Раніше очікувався <a href="language.types.resource.php" class="link">resource</a>.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>

 
 <div class="refsect1 examples" id="refsect1-function.pg-lo-read-all-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 <span class="function"><strong>pg_lo_read_all()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />   header</span><span style="color: #007700">(</span><span style="color: #DD0000">'Content-type: image/jpeg'</span><span style="color: #007700">);<br />   </span><span style="color: #0000BB">$image_oid </span><span style="color: #007700">= </span><span style="color: #0000BB">189762345</span><span style="color: #007700">;<br />   </span><span style="color: #0000BB">$database </span><span style="color: #007700">= </span><span style="color: #0000BB">pg_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">"dbname=jacarta"</span><span style="color: #007700">);<br />   </span><span style="color: #0000BB">pg_query</span><span style="color: #007700">(</span><span style="color: #0000BB">$database</span><span style="color: #007700">, </span><span style="color: #DD0000">"begin"</span><span style="color: #007700">);<br />   </span><span style="color: #0000BB">$handle </span><span style="color: #007700">= </span><span style="color: #0000BB">pg_lo_open</span><span style="color: #007700">(</span><span style="color: #0000BB">$database</span><span style="color: #007700">, </span><span style="color: #0000BB">$image_oid</span><span style="color: #007700">, </span><span style="color: #DD0000">"r"</span><span style="color: #007700">);<br />   </span><span style="color: #0000BB">pg_lo_read_all</span><span style="color: #007700">(</span><span style="color: #0000BB">$handle</span><span style="color: #007700">);<br />   </span><span style="color: #0000BB">pg_query</span><span style="color: #007700">(</span><span style="color: #0000BB">$database</span><span style="color: #007700">, </span><span style="color: #DD0000">"commit"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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

 
 <div class="refsect1 seealso" id="refsect1-function.pg-lo-read-all-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.pg-lo-read.php" class="function" rel="rdfs-seeAlso">pg_lo_read()</a> - Read a large object</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>