mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-19 06:16:58 +08:00
119 lines
3.9 KiB
HTML
119 lines
3.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>Open persistent Informix connection</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.ifx-pconnect" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">ifx_pconnect</h1>
|
|
<p class="verinfo">(PHP 4, PHP 5 < 5.2.1)</p><p class="refpurpose"><span class="refname">ifx_pconnect</span> — <span class="dc-title">Open persistent Informix connection</span></p>
|
|
|
|
</div>
|
|
|
|
<div class="refsect1 description" id="refsect1-function.ifx-pconnect-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>ifx_pconnect</strong></span>
|
|
([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$database</code></span>
|
|
[, <span class="methodparam"><span class="type">string</span> <code class="parameter">$userid</code></span>
|
|
[, <span class="methodparam"><span class="type">string</span> <code class="parameter">$password</code></span>
|
|
]]] ) : <span class="type">resource</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
<span class="function"><strong>ifx_pconnect()</strong></span> acts very much like
|
|
<span class="function"><a href="ifx_connect.html" class="function">ifx_connect()</a></span> with two major differences.
|
|
</p>
|
|
<p class="para">
|
|
First, when connecting, the function would first try to find a
|
|
(persistent) link that's already open with the same host,
|
|
username and password. 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 SQL server will not be closed when
|
|
the execution of the script ends. Instead, the link will remain
|
|
open for future use (<span class="function"><a href="ifx_close.html" class="function">ifx_close()</a></span> will not
|
|
close links established by <span class="function"><strong>ifx_pconnect()</strong></span>).
|
|
</p>
|
|
<p class="para">
|
|
This type of links is therefore called 'persistent'.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.ifx-pconnect-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
All of the arguments are optional, and if they're missing, defaults are
|
|
taken from values supplied in <var class="filename">php.ini</var> (ifx.default_host for the host
|
|
(Informix libraries will use <var class="envar">INFORMIXSERVER</var> environment
|
|
value if not defined), ifx.default_user for user, ifx.default_password for
|
|
the password (none if not defined).
|
|
</p>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">database</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The database name, as a string.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">userid</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The username, as a string.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">password</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The password, as a string.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.ifx-pconnect-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
Returns: valid Informix persistent link identifier on success, or <strong><code>FALSE</code></strong>
|
|
on errors.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.ifx-pconnect-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="ifx_connect.html" class="function" rel="rdfs-seeAlso">ifx_connect()</a> - Open Informix server connection</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div></div></div></body></html> |