<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/pdo.drivers.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'ref.pdo-ibm.php',
    1 => 'IBM PDO Driver',
    2 => 'IBM PDO Driver (PDO_IBM)',
  ),
  'up' => 
  array (
    0 => 'pdo.drivers.php',
    1 => 'PDO 驱动',
  ),
  'prev' => 
  array (
    0 => 'pdo-firebird.getapiversion.php',
    1 => 'Pdo\\Firebird::getApiVersion',
  ),
  'next' => 
  array (
    0 => 'ref.pdo-ibm.connection.php',
    1 => 'PDO_IBM DSN',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/pdo_ibm/reference.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/ref.pdo-ibm.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="ref.pdo-ibm" class="reference">
 
  <h1 class="title">IBM PDO Driver (PDO_IBM)</h1>
  
  <div class="partintro">

   <div class="section" id="pdo-ibm.intro">
    <h2 class="title">简介</h2>
    <p class="para">
     PDO_IBM is a driver that implements the <a href="book.pdo.php#intro.pdo" class="link">PHP Data
     Objects (PDO)</a> interface to enable access from PHP to IBM databases.
    </p>
   </div>

   
   

<div class="section" id="ref.pdo-ibm.installation">
 <h2 class="title">安装</h2>
 <p class="para">
  To build the PDO_IBM extension, the DB2 Client v9.1 or later must be 
  installed on the same system as PHP. The DB2 Client can be downloaded 
  from the IBM <a href="http://www.ibm.com/software/data/db2/ad" class="link external">&raquo;&nbsp;Application Development 
  Site</a>.
 </p>
 <blockquote class="note"><p><strong class="note">注意</strong>: 
  <strong>Note</strong><br />
   <p class="para">
    The DB2 Client v9.1 or later supports direct access to DB2 for Linux, 
    UNIX, and Windows v8 and v9.1 servers.
   </p>
   <p class="para">
    The DB2 Client v9.1 also supports access to DB2 UDB for i5 and DB2 UDB 
    for z/OS servers using the separately purchased <a href="http://www.ibm.com/software/data/db2/db2connect" class="link external">&raquo;&nbsp;DB2 
    Connect product</a>.
   </p>
 </p></blockquote>
 <p class="para">
  PDO_IBM is a <a href="https://pecl.php.net/" class="link external">&raquo;&nbsp;PECL</a> extension, so follow the instructions in
  <a href="install.pecl.php" class="xref">PECL 扩展安装</a> to install the PDO_IBM extension.
  Issue the <strong class="command">configure</strong> command to point to the location of the
  DB2 Client header files and libraries as follows:
  <div class="example-contents screen">
<div class="cdata"><pre>
bash$ ./configure --with-pdo-ibm=/path/to/sqllib[,shared]
</pre></div>
  </div>
  The <strong class="command">configure</strong> command defaults to the value of the 
  <var class="envar">DB2DIR</var> environment variable.
 </p>
</div>



   
   

<div class="section" id="pdo-ibm.configuration">
 <h2 class="title">运行时配置</h2>
 <p class="simpara">
这些函数的行为受 <var class="filename">php.ini</var> 中的设置影响。
</p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>PDO_IBM Configuration Options</strong></caption>
   
    <thead>
     <tr>
      <th>名字</th>
      <th>默认</th>
      <th>可修改范围</th>
      <th>更新日志</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><a href="ref.pdo-ibm.php#ini.pdo-ibm.i5-dbcs-alloc" class="link">pdo_ibm.i5_dbcs_alloc</a></td>
      <td>&quot;0&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>Added in PDO_IBM 1.5.0</td>
     </tr>

     <tr>
      <td><a href="ref.pdo-ibm.php#ini.pdo-ibm.i5-override-ccsid" class="link">pdo_ibm.i5_override_ccsid</a></td>
      <td>&quot;0&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td>Added in PDO_IBM 1.5.0</td>
     </tr>

    </tbody>
   
  </table>

  有关 INI_* 样式的更多详情与定义，见 <a href="configuration.changes.modes.php" class="xref">配置可被设定范围</a>。
</p>

<p class="para">这是配置指令的简短说明。</p>

 <p class="para">
  <dl>
   
    <dt id="ini.pdo-ibm.i5-dbcs-alloc">
     <code class="parameter">pdo_ibm.i5_dbcs_alloc</code>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
    </dt>
    <dd>
     <p class="para">
      This options affects the internal buffer allocation strategy on IBM i.
      By default, this option is 0. When this option is set, buffers are
      allocated with a much larger size, in case the database is misleading
      about character size when converting between encodings. This option uses
      six times as much memory for buffers (to account for the largest possible
      UTF-8 sequences), but may be needed if truncated data is returned.
      <ul class="itemizedlist">
       <li class="listitem">
        <p class="para">
         0 - Minimum size buffers are allocated.
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         1 - Larger size buffers are allocated.
        </p>
       </li>
      </ul>
     </p>
    </dd>
   
   
    <dt id="ini.pdo-ibm.i5-override-ccsid">
     <code class="parameter">pdo_ibm.i5_override_ccsid</code>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
    </dt>
    <dd>
     <p class="para">
      The ASCII CCSID to use for conversion from EBCDIC on IBM i. Setting this
      to 1208 will use UTF-8. By default, this is 0, which will select the
      default ASCII job CCSID.
     </p>
     <p class="para">
      To learn more about CCSIDs on IBM i, consult the
      <a href="https://www.ibm.com/docs/en/i/7.5?topic=information-ccsid-reference" class="link external">&raquo;&nbsp;IBM documentation</a>.
     </p>
    </dd>
   
  </dl>
 </p>
</div>




  </div>

  

 <h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="ref.pdo-ibm.connection.php">PDO_IBM DSN</a> — Connecting to IBM databases</li></ul>
</div>
<?php manual_footer($setup); ?>