<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.pdo-sqlite.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'ref.pdo-sqlite.connection.php',
    1 => 'PDO_SQLITE DSN',
    2 => 'Connecting to SQLite databases',
  ),
  'up' => 
  array (
    0 => 'ref.pdo-sqlite.php',
    1 => 'SQLite PDO Driver',
  ),
  'prev' => 
  array (
    0 => 'ref.pdo-sqlite.php',
    1 => 'SQLite PDO Driver',
  ),
  'next' => 
  array (
    0 => 'pdo.sqlitecreateaggregate.php',
    1 => 'PDO::sqliteCreateAggregate',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/pdo_sqlite/reference.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="ref.pdo-sqlite.connection" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">PDO_SQLITE DSN</h1>
    <p class="verinfo">(PHP 5 &gt;= 5.1.0, PHP 7, PECL PDO_SQLITE &gt;= 0.2.0)</p><p class="refpurpose"><span class="refname">PDO_SQLITE DSN</span> &mdash; <span class="dc-title">Connecting to SQLite databases</span></p>

   </div>

   <div class="refsect1 description" id="refsect1-ref.pdo-sqlite.connection-description">
    <h3 class="title">说明</h3>
    <p class="para">
     The PDO_SQLITE Data Source Name (DSN) is composed of the following elements:
     <dl>
      
       <dt>DSN prefix (SQLite 3)</dt>
       <dd>
        <p class="para">
         The DSN prefix is <strong class="userinput"><code>sqlite:</code></strong>.
         <ul class="itemizedlist">
          <li class="listitem">
           <p class="para">
            To access a database on disk, the absolute path has to be appended to the
            DSN prefix.
           </p>
          </li>
          <li class="listitem">
           <p class="para">
            To create a database in memory, <code class="literal">:memory:</code> has to be appended
            to the DSN prefix.
           </p>
          </li>
          <li class="listitem">
           <p class="para">
            If the DSN consists of the DSN prefix only, a temporary database is used,
            which is deleted when the connection is closed.
           </p>
          </li>
         </ul>
        </p>
       </dd>
      
     </dl>
    </p>
   </div>

   <div class="refsect1 examples" id="refsect1-ref.pdo-sqlite.connection-examples">
    <h3 class="title">示例</h3>
    <p class="para">
     <div class="example" id="example-1">
      <p><strong>示例 #1 PDO_SQLITE DSN examples</strong></p>
      <div class="example-contents"><p>
       The following examples show PDO_SQLITE DSN for connecting to
       SQLite databases:
       <div class="example-contents">
<div class="cdata"><pre>
sqlite:/opt/databases/mydb.sq3
sqlite::memory:
sqlite:
</pre></div>
       </div>

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

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