<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >ibase_pconnect</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PHP 手册" HREF="index.html"><LINK REL="UP" TITLE="Firebird/InterBase Functions" HREF="ref.ibase.html"><LINK REL="PREVIOUS" TITLE="ibase_param_info" HREF="function.ibase-param-info.html"><LINK REL="NEXT" TITLE="ibase_prepare" HREF="function.ibase-prepare.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.ibase-param-info.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.ibase-prepare.html" ACCESSKEY="N" >下一页</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.ibase-pconnect" ></A >ibase_pconnect</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN57377" ></A ><P > (PHP 3 >= 3.0.6, PHP 4, PHP 5)</P >ibase_pconnect -- Open a persistent connection to an InterBase database </DIV ><DIV CLASS="refsect1" ><A NAME="AEN57380" ></A ><H2 >Description</H2 >resource <B CLASS="methodname" >ibase_pconnect</B > ( [string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role [, int sync]]]]]]]] )<BR ></BR ><P > <B CLASS="function" >ibase_pconnect()</B > acts very much like <A HREF="function.ibase-connect.html" ><B CLASS="function" >ibase_connect()</B ></A > with two major differences. First, when connecting, the function will first try to find a (persistent) link that's already opened with the same parameters. If one is found, an identifier for it will be returned instead of opening a new connection. Second, the connection to the InterBase server will not be closed when the execution of the script ends. Instead, the link will remain open for future use (<A HREF="function.ibase-close.html" ><B CLASS="function" >ibase_close()</B ></A > will not close links established by <B CLASS="function" >ibase_pconnect()</B >). This type of link is therefore called 'persistent'. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >注意: </B > <CODE CLASS="parameter" >buffers</CODE > was added in PHP 4.0.0. </P ></BLOCKQUOTE ></DIV ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >注意: </B > <CODE CLASS="parameter" >dialect</CODE > was added in PHP 4.0.0. It is functional only with InterBase 6 and versions higher than that. </P ></BLOCKQUOTE ></DIV ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >注意: </B > <CODE CLASS="parameter" >role</CODE > was added in PHP 4.0.0. It is functional only with InterBase 5 and versions higher than that. </P ></BLOCKQUOTE ></DIV ><P > See also <A HREF="function.ibase-close.html" ><B CLASS="function" >ibase_close()</B ></A > and <A HREF="function.ibase-connect.html" ><B CLASS="function" >ibase_connect()</B ></A > for the meaning of parameters passed to this function. They are exactly the same. </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.ibase-param-info.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.ibase-prepare.html" ACCESSKEY="N" >下一页</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >ibase_param_info</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.ibase.html" ACCESSKEY="U" >上一级</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >ibase_prepare</TD ></TR ></TABLE ></DIV ></BODY ></HTML >