<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.ibase.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.ibase-pconnect.php',
    1 => 'ibase_pconnect',
    2 => 'Open a persistent connection to an InterBase database',
  ),
  'up' => 
  array (
    0 => 'ref.ibase.php',
    1 => 'Firebird/InterBase 函数',
  ),
  'prev' => 
  array (
    0 => 'function.ibase-param-info.php',
    1 => 'ibase_param_info',
  ),
  'next' => 
  array (
    0 => 'function.ibase-prepare.php',
    1 => 'ibase_prepare',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/ibase/functions/ibase-pconnect.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.ibase-pconnect" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ibase_pconnect</h1>
  <p class="verinfo">(PHP 5, PHP 7 &lt; 7.4.0)</p><p class="refpurpose"><span class="refname">ibase_pconnect</span> &mdash; <span class="dc-title">Open a persistent connection to an InterBase database</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.ibase-pconnect-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ibase_pconnect</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$database</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$username</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$password</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$charset</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$buffers</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$dialect</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$role</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$sync</code><span class="initializer"> = ?</span></span><br>): <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span></div>

  <p class="simpara">
   Opens a persistent connection to an InterBase database.
  </p>
  <p class="simpara">
   <span class="function"><strong>ibase_pconnect()</strong></span> acts very much like
   <span class="function"><a href="function.ibase-connect.php" class="function">ibase_connect()</a></span> with two major differences.
  </p>
  <p class="simpara">
   First, when connecting, the function will first try to find a (persistent)
   link that&#039;s already opened with the same parameters. If one is found, an
   identifier for it will be returned instead of opening a new connection.
  </p>
  <p class="simpara">
   Second, the connection to the InterBase server will not be closed when the
   execution of the script ends. Instead, the link will remain open for
   future use (<span class="function"><a href="function.ibase-close.php" class="function">ibase_close()</a></span> will not close links
   established by <span class="function"><strong>ibase_pconnect()</strong></span>). This type of link is
   therefore called &#039;persistent&#039;.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ibase-pconnect-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt><code class="parameter">database</code></dt>
    <dd>
     <span class="simpara">
      The <code class="parameter">database</code> argument has to be a valid path to
      database file on the server it resides on. If the server is not local,
      it must be prefixed with either &#039;hostname:&#039; (TCP/IP), &#039;//hostname/&#039;
      (NetBEUI) or &#039;hostname@&#039; (IPX/SPX), depending on the connection
      protocol used.
     </span>
    </dd>
   
   
    <dt><code class="parameter">username</code></dt>
    <dd>
     <span class="simpara">
      The user name. Can be set with the
      <code class="literal">ibase.default_user</code> <var class="filename">php.ini</var> directive.
     </span>
    </dd>
   
   
    <dt><code class="parameter">password</code></dt>
    <dd>
     <span class="simpara">
      The password for <code class="parameter">username</code>. Can be set with the
      <code class="literal">ibase.default_password</code> <var class="filename">php.ini</var> directive.
     </span>
    </dd>
   
   
    <dt><code class="parameter">charset</code></dt>
    <dd>
     <span class="simpara">
      <code class="parameter">charset</code> is the default character set for a
      database.
     </span>
    </dd>
   
   
    <dt><code class="parameter">buffers</code></dt>
    <dd>
     <span class="simpara">
      <code class="parameter">buffers</code> is the number of database buffers to
      allocate for the server-side cache. If 0 or omitted, server chooses
      its own default.
     </span>
    </dd>
   
   
    <dt><code class="parameter">dialect</code></dt>
    <dd>
     <span class="simpara">
      <code class="parameter">dialect</code> selects the default SQL dialect for any
      statement executed within a connection, and it defaults to the highest
      one supported by client libraries. Functional only with InterBase 6
      and up.
     </span>
    </dd>
   
   
    <dt><code class="parameter">role</code></dt>
    <dd>
     <span class="simpara">
      Functional only with InterBase 5 and up.
     </span>
    </dd>
   
   
    <dt><code class="parameter">sync</code></dt>
    <dd>
     <span class="simpara">
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ibase-pconnect-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="simpara">
   Returns an InterBase link identifier on success, or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on error.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ibase-pconnect-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.ibase-close.php" class="function" rel="rdfs-seeAlso">ibase_close()</a> - Close a connection to an InterBase database</span></li>
   <li><span class="function"><a href="function.ibase-connect.php" class="function" rel="rdfs-seeAlso">ibase_connect()</a> - Open a connection to a database</span></li>
  </ul>
 </div>


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