Sophie

Sophie

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

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
>yaz_connect</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="YAZ Functions"
HREF="ref.yaz.html"><LINK
REL="PREVIOUS"
TITLE="yaz_close"
HREF="function.yaz-close.html"><LINK
REL="NEXT"
TITLE="yaz_database"
HREF="function.yaz-database.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.yaz-close.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.yaz-database.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.yaz-connect"
></A
>yaz_connect</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN247595"
></A
><P
>    (PHP 4 &#62;= 4.0.1, PECL)</P
>yaz_connect&nbsp;--&nbsp;
   Prepares for a connection to a Z39.50 server
  </DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN247598"
></A
><H2
>说明</H2
>mixed <B
CLASS="methodname"
>yaz_connect</B
> ( string zurl [, mixed options] )<BR
></BR
><P
>&#13;   This function returns a connection resource on success, zero on
   failure.
  </P
><P
>&#13;   <B
CLASS="function"
>yaz_connect()</B
> prepares for a connection to a
   Z39.50 server. 
   This function is non-blocking and does not attempt to establish
   a connection  - it merely prepares a connect to be performed later when
   <A
HREF="function.yaz-wait.html"
><B
CLASS="function"
>yaz_wait()</B
></A
> is called.
  </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>
    The <A
HREF="http://www.indexdata.dk/yazproxy/"
TARGET="_top"
>YAZ proxy</A
> is a
    freely available Z39.50 proxy.
   </P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN247616"
></A
><H2
>参数</H2
><P
>&#13;   <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><CODE
CLASS="parameter"
>zurl</CODE
></DT
><DD
><P
>&#13;       A string that takes the form <TT
CLASS="literal"
>host[:port][/database]</TT
>.
       If port is omitted, port 210 is used. If database is omitted 
       <TT
CLASS="literal"
>Default</TT
> is used.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>options</CODE
></DT
><DD
><P
>&#13;       If given as a string, it is treated as the Z39.50 V2 authentication 
       string (OpenAuth).
      </P
><P
>&#13;       If given as an array, the contents of the array serves as options.
       <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
>user</DT
><DD
><P
>&#13;           Username for authentication.
          </P
></DD
><DT
>group</DT
><DD
><P
>&#13;           Group for authentication.
          </P
></DD
><DT
>password</DT
><DD
><P
>&#13;            Password for authentication.
           </P
></DD
><DT
>cookie</DT
><DD
><P
>&#13;           Cookie for session (YAZ proxy).
          </P
></DD
><DT
>proxy</DT
><DD
><P
>&#13;           Proxy for connection (YAZ proxy).
          </P
></DD
><DT
>persistent</DT
><DD
><P
>&#13;           A boolean. If <TT
CLASS="constant"
><B
>TRUE</B
></TT
> the connection is persistent; If <TT
CLASS="constant"
><B
>FALSE</B
></TT
> the
           connection is not persistent. By default connections are persistent.
          </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>
            If you open a persistent connection, you won't be able to close 
            it later with <A
HREF="function.yaz-close.html"
><B
CLASS="function"
>yaz_close()</B
></A
>.
           </P
></BLOCKQUOTE
></DIV
></DD
><DT
>piggyback</DT
><DD
><P
>&#13;           A boolean. If <TT
CLASS="constant"
><B
>TRUE</B
></TT
> piggyback is enabled for searches; If <TT
CLASS="constant"
><B
>FALSE</B
></TT
>
           piggyback is disabled. By default piggyback is enabled.
          </P
><P
>&#13;           Enabling piggyback is more efficient and usually saves a 
           network-round-trip for first time fetches of records. However, a 
           few Z39.50 servers do not support piggyback or they ignore element
           set names. For those, piggyback should be disabled.
          </P
></DD
><DT
>charset</DT
><DD
><P
>&#13;           A string that specifies character set to be used in Z39.50 
           language and character set negotiation. Use strings such as:
           <TT
CLASS="literal"
>ISO-8859-1</TT
>, <TT
CLASS="literal"
>UTF-8</TT
>, 
           <TT
CLASS="literal"
>UTF-16</TT
>.
          </P
><P
>&#13;           Most Z39.50 servers do not support this feature (and thus, this is
           ignored). Many servers use the ISO-8859-1 encoding for queries and
           messages. MARC21/USMARC records are not affected by this setting.
          </P
></DD
><DT
>preferredMessageSize</DT
><DD
><P
>&#13;           An integer that specifies the maximum byte size of all records
           to be returned by a target during retrieval. See the
           <A
HREF="http://www.loc.gov/z3950/agency/markup/04.html#3.2.1.1.4"
TARGET="_top"
>Z39.50 standard</A
> for more
           information.
          </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>
            This option is supported in PECL YAZ 1.0.5 or later.
           </P
></BLOCKQUOTE
></DIV
></DD
><DT
>maximumRecordSize</DT
><DD
><P
>&#13;           An integer that specifies the maximum byte size of a single record
           to be returned by a target during retrieval. This
           entity is referred to as Exceptional-record-size in the
          <A
HREF="http://www.loc.gov/z3950/agency/markup/04.html#3.2.1.1.4"
TARGET="_top"
>Z39.50 standard</A
>.
          </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>
            This option is supported in PECL YAZ 1.0.5 or later.
           </P
></BLOCKQUOTE
></DIV
></DD
></DL
></DIV
>
      </P
></DD
></DL
></DIV
>
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN247692"
></A
><H2
>返回值</H2
><P
>&#13;   A connection resource on success, <TT
CLASS="constant"
><B
>FALSE</B
></TT
> on error.
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN247696"
></A
><H2
>更新日志</H2
><P
>&#13;   <DIV
CLASS="informaltable"
><P
></P
><A
NAME="AEN247699"
></A
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>版本</TH
><TH
>说明</TH
></TR
></THEAD
><TBODY
><TR
><TD
>4.1.0</TD
><TD
>&#13;        The parameter <CODE
CLASS="parameter"
>options</CODE
> was added.
       </TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
>
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN247710"
></A
><H2
>参见</H2
><P
>&#13;   <P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
><A
HREF="function.yaz-close.html"
><B
CLASS="function"
>yaz_close()</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.yaz-close.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.yaz-database.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>yaz_close</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.yaz.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>yaz_database</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>