<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.sqlite3.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'sqlite3.escapestring.php',
    1 => 'SQLite3::escapeString',
    2 => 'Returns a string that has been properly escaped',
  ),
  'up' => 
  array (
    0 => 'class.sqlite3.php',
    1 => 'SQLite3',
  ),
  'prev' => 
  array (
    0 => 'sqlite3.enableexceptions.php',
    1 => 'SQLite3::enableExceptions',
  ),
  'next' => 
  array (
    0 => 'sqlite3.exec.php',
    1 => 'SQLite3::exec',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/sqlite3/sqlite3/escapestring.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="sqlite3.escapestring" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SQLite3::escapeString</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SQLite3::escapeString</span> &mdash; <span class="dc-title">Returns a string that has been properly escaped</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-sqlite3.escapestring-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><strong>SQLite3::escapeString</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$string</code></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   Returns a string that has been properly escaped for safe inclusion in an
   SQL statement.
  </p>
  <div class="warning"><strong class="warning">警告</strong><p class="simpara">此函数（还）不能安全地适用于二进制对象！</p></div>
  <p class="para">
   To properly handle BLOB fields which may contain NUL characters, use
   <span class="function"><a href="sqlite3stmt.bindparam.php" class="function">SQLite3Stmt::bindParam()</a></span> instead.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-sqlite3.escapestring-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">string</code></dt>
     <dd>
      <p class="para">
       The string to be escaped.
      </p>
     </dd>
    
   </dl>
  </p>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-sqlite3.escapestring-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns a properly escaped string that may be used safely in an SQL
   statement.
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-sqlite3.escapestring-notes">
  <h3 class="title">注释</h3>
  <div class="warning"><strong class="warning">警告</strong>
   <p class="simpara">
    <span class="function"><a href="function.addslashes.php" class="function">addslashes()</a></span> should <em>NOT</em> be used to
    quote your strings for SQLite queries; it will lead to strange results
    when retrieving your data.
   </p>
  </div>
 </div>


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