function.ibase-pconnect.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 253 行
HTML
253 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Open a persistent connection to an InterBase database</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.ibase-param-info.html">ibase_param_info</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ibase-prepare.html">ibase_prepare</a></div> <div class="up"><a href="ref.ibase.html">Firebird/InterBase Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.ibase-pconnect" class="refentry"> <div class="refnamediv"> <h1 class="refname">ibase_pconnect</h1> <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">ibase_pconnect</span> — <span class="dc-title">Open a persistent connection to an InterBase database</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">resource</span> <span class="methodname"><b><b>ibase_pconnect</b></b></span> ([ <span class="methodparam"><span class="type">string</span> <tt class="parameter">$database</tt></span> [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$username</tt></span> [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$password</tt></span> [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$charset</tt></span> [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$buffers</tt></span> [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$dialect</tt></span> [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$role</tt></span> [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$sync</tt></span> ]]]]]]]] )</div> <p class="para rdfs-comment"> Opens a persistent connection to an InterBase database. </p> <p class="para"> <b>ibase_pconnect()</b> acts very much like <a href="function.ibase-connect.html" class="function">ibase_connect()</a> with two major differences. </p> <p class="para"> 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. </p> <p class="para"> 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" class="function">ibase_close()</a> will not close links established by <b>ibase_pconnect()</b>). This type of link is therefore called 'persistent'. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><i><tt class="parameter">database</tt></i></span> <dd> <p class="para"> The <i><tt class="parameter">database</tt></i> argument has to be a valid path to database file on the server it resides on. If the server is not local, it must be prefixed with either 'hostname:' (TCP/IP), '//hostname/' (NetBEUI) or 'hostname@' (IPX/SPX), depending on the connection protocol used. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">username</tt></i></span> <dd> <p class="para"> The user name. Can be set with the <i>ibase.default_user</i> <var class="filename">php.ini</var> directive. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">password</tt></i></span> <dd> <p class="para"> The password for <i><tt class="parameter">username</tt></i>. Can be set with the <i>ibase.default_password</i> <var class="filename">php.ini</var> directive. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">charset</tt></i></span> <dd> <p class="para"> <i><tt class="parameter">charset</tt></i> is the default character set for a database. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">buffers</tt></i></span> <dd> <p class="para"> <i><tt class="parameter">buffers</tt></i> is the number of database buffers to allocate for the server-side cache. If 0 or omitted, server chooses its own default. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">dialect</tt></i></span> <dd> <p class="para"> <i><tt class="parameter">dialect</tt></i> selects the default SQL dialect for any statement executed within a connection, and it defaults to the highest one supported by client libraries. Functional only with InterBase 6 and up. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">role</tt></i></span> <dd> <p class="para"> Functional only with InterBase 5 and up. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">sync</tt></i></span> <dd> <p class="para"> </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns an InterBase link identifier on success, or <b><tt>FALSE</tt></b> on error. </p> </div> <div class="refsect1 changelog"> <h3 class="title">ChangeLog</h3> <p class="para"> <table class="informaltable"> <colgroup> <thead valign="middle"> <tr valign="middle"> <th colspan="1">Version</th> <th colspan="1">Description</th> </tr> </thead> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">4.0.0</td> <td colspan="1" rowspan="1" align="left"> The <i><tt class="parameter">buffers</tt></i>, <i><tt class="parameter">dialect</tt></i> and <i><tt class="parameter">role</tt></i> parameters were added </td> </tr> </tbody> </colgroup> </table> </p> </div> <div class="refsect1 seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="function.ibase-close.html" class="function" rel="rdfs-seeAlso">ibase_close()</a></li> <li class="member"><a href="function.ibase-connect.html" class="function" rel="rdfs-seeAlso">ibase_connect()</a></li> </ul> </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.ibase-param-info.html">ibase_param_info</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ibase-prepare.html">ibase_prepare</a></div> <div class="up"><a href="ref.ibase.html">Firebird/InterBase Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?