Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 05cd670d8a02b2b4a0ffb1756f2e8308 > files > 9745

php-manual-zh-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>sqlite_udf_encode_binary</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="SQLite Functions"
HREF="ref.sqlite.html"><LINK
REL="PREVIOUS"
TITLE="sqlite_udf_decode_binary"
HREF="function.sqlite-udf-decode-binary.html"><LINK
REL="NEXT"
TITLE="sqlite_unbuffered_query"
HREF="function.sqlite-unbuffered-query.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP 手册</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.sqlite-udf-decode-binary.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.sqlite-unbuffered-query.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.sqlite-udf-encode-binary"
></A
>sqlite_udf_encode_binary</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN218070"
></A
><P
>    (PHP 5)</P
>sqlite_udf_encode_binary&nbsp;--&nbsp;Encode binary data before returning it from an UDF</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN218073"
></A
><H2
>说明</H2
>string <B
CLASS="methodname"
>sqlite_udf_encode_binary</B
> ( string data )<BR
></BR
><P
>&#13;   <B
CLASS="function"
>sqlite_udf_encode_binary()</B
> applies a binary encoding
   to the <CODE
CLASS="parameter"
>data</CODE
> so that it can be safely returned from
   queries (since the underlying libsqlite API is not binary safe).
  </P
><P
>&#13;   If there is a chance that your data might be binary unsafe (e.g.: it
   contains a NUL byte in the middle rather than at the end, or if it has and
   <TT
CLASS="literal"
>0x01</TT
> byte as the first character) then you must
   call this function to encode the return value from your UDF.
  </P
><P
>&#13;   PHP does not perform this encode/decode operation automatically as it would
   severely impact performance if it did.
  </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>
    Do not use <A
HREF="function.sqlite-escape-string.html"
><B
CLASS="function"
>sqlite_escape_string()</B
></A
> to quote strings
    returned from UDF's as it will lead to double-quoting of the data.  Use
    <B
CLASS="function"
>sqlite_udf_encode_binary()</B
> instead!
   </P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN218091"
></A
><H2
>参见</H2
><P
>&#13;   <P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
><A
HREF="function.sqlite-udf-decode-binary.html"
><B
CLASS="function"
>sqlite_udf_decode_binary()</B
></A
></TD
></TR
><TR
><TD
><A
HREF="function.sqlite-escape-string.html"
><B
CLASS="function"
>sqlite_escape_string()</B
></A
></TD
></TR
><TR
><TD
><A
HREF="function.sqlite-create-function.html"
><B
CLASS="function"
>sqlite_create_function()</B
></A
></TD
></TR
><TR
><TD
><A
HREF="function.sqlite-create-aggregate.html"
><B
CLASS="function"
>sqlite_create_aggregate()</B
></A
></TD
></TR
></TBODY
></TABLE
><P
></P
>
  </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.sqlite-udf-decode-binary.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>起始页</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.sqlite-unbuffered-query.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>sqlite_udf_decode_binary</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.sqlite.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>sqlite_unbuffered_query</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>