mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
92 lines
4.6 KiB
HTML
92 lines
4.6 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>List all the handlers available</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.dba-handlers" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">dba_handlers</h1>
|
|
<p class="verinfo">(PHP 4 >= 4.3.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">dba_handlers</span> — <span class="dc-title">List all the handlers available</span></p>
|
|
|
|
</div>
|
|
<div class="refsect1 description" id="refsect1-function.dba-handlers-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>dba_handlers</strong></span>
|
|
([ <span class="methodparam"><span class="type">bool</span> <code class="parameter">$full_info</code><span class="initializer"> = <strong><code>FALSE</code></strong></span></span>
|
|
] ) : <span class="type">array</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
<span class="function"><strong>dba_handlers()</strong></span> list all the handlers supported by this
|
|
extension.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.dba-handlers-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">full_info</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
Turns on/off full information display in the result.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.dba-handlers-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
Returns an array of database handlers. If <code class="parameter">full_info</code>
|
|
is set to <strong><code>TRUE</code></strong>, the array will be associative with the handlers names as
|
|
keys, and their version information as value. Otherwise, the result will be
|
|
an indexed array of handlers names.
|
|
</p>
|
|
<blockquote class="note"><p><strong class="note">Note</strong>:
|
|
<p class="para">
|
|
When the internal cdb library is used you will see
|
|
<em>cdb</em> and <em>cdb_make</em>.
|
|
</p>
|
|
</p></blockquote>
|
|
</div>
|
|
|
|
<div class="refsect1 examples" id="refsect1-function.dba-handlers-examples">
|
|
<h3 class="title">范例</h3>
|
|
<p class="para">
|
|
<div class="example" id="example-968">
|
|
<p><strong>Example #1 <span class="function"><strong>dba_handlers()</strong></span> Example</strong></p>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
<span style="color: #0000BB"><?php<br /><br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"Available DBA handlers:\n"</span><span style="color: #007700">;<br />foreach (</span><span style="color: #0000BB">dba_handlers</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">) as </span><span style="color: #0000BB">$handler_name </span><span style="color: #007700">=> </span><span style="color: #0000BB">$handler_version</span><span style="color: #007700">) {<br /> </span><span style="color: #FF8000">// clean the versions<br /> </span><span style="color: #0000BB">$handler_version </span><span style="color: #007700">= </span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'$'</span><span style="color: #007700">, </span><span style="color: #DD0000">''</span><span style="color: #007700">, </span><span style="color: #0000BB">$handler_version</span><span style="color: #007700">);<br /> echo </span><span style="color: #DD0000">" - </span><span style="color: #0000BB">$handler_name</span><span style="color: #DD0000">: </span><span style="color: #0000BB">$handler_version</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">?></span>
|
|
</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
<div class="example-contents"><p>以上例程的输出类似于:</p></div>
|
|
<div class="example-contents screen">
|
|
<div class="cdata"><pre>
|
|
Available DBA handlers:
|
|
- cdb: 0.75, Revision: 1.3.2.3
|
|
- cdb_make: 0.75, Revision: 1.2.2.4
|
|
- db2: Sleepycat Software: Berkeley DB 2.7.7: (08/20/99)
|
|
- inifile: 1.0, Revision: 1.6.2.3
|
|
- flatfile: 1.0, Revision: 1.5.2.4
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
</p>
|
|
</div>
|
|
|
|
</div></div></div></body></html> |