uTools-Manuals/docs/php/px_get_info.html
2019-04-08 23:22:26 +08:00

194 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>Return lots of information about a paradox file</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.px-get-info" class="refentry">
<div class="refnamediv">
<h1 class="refname">px_get_info</h1>
<p class="verinfo">(PECL paradox &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">px_get_info</span> &mdash; <span class="dc-title">Return lots of information about a paradox file</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.px-get-info-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>px_get_info</strong></span>
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$pxdoc</code></span>
) : <span class="type">array</span></div>
</div>
<div class="refsect1 parameters" id="refsect1-function.px-get-info-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">pxdoc</code></dt>
<dd>
<p class="para">
Resource identifier of the paradox database
as returned by <span class="function"><a href="px_new.html" class="function">px_new()</a></span>.
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.px-get-info-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
Returns an associated array with lots of information about a paradox
file. This array is likely to be extended in the future.
</p>
<dl>
<dt>
fileversion</dt>
<dd>
<p class="para">Version of file multiplied by 10, e.g. 70.</p>
</dd>
<dt>
tablename</dt>
<dd>
<p class="para">Name of table as stored in the file. If the database was created
by pxlib, then this will be the name of the file without the
extension.</p>
</dd>
<dt>
numrecords</dt>
<dd>
<p class="para">Number of records in this table.</p>
</dd>
<dt>
numfields</dt>
<dd>
<p class="para">Number of fields in this table.</p>
</dd>
<dt>
headersize</dt>
<dd>
<p class="para">Number of bytes used for the header. This is usually 0x800.</p>
</dd>
<dt>
recordsize</dt>
<dd>
<p class="para">Number of bytes used for each record. This is the sum of all
field sizes (available since version 1.4.2).</p>
</dd>
<dt>
maxtablesize</dt>
<dd>
<p class="para">
This value multiplied by 0x400 is the size of a data block in bytes.
The maximum number of records in a datablock is the integer part of
(maxtablesize * 0x400 - 8) / recordsize.
</p>
</dd>
<dt>
numdatablocks</dt>
<dd>
<p class="para">
The number of data blocks in the file. Each data block contains a
certain number of records which depends on the record size and the data
block size (maxtablesize). Data blocks may not necessarily be
completely filled.
</p>
</dd>
<dt>
numindexfields</dt>
<dd>
<p class="para">
Number of fields used for the primary index. The fields do always start
with field number 1.
</p>
</dd>
<dt>
codepage</dt>
<dd>
<p class="para">
The DOS codepage which was used for encoding fields with character data.
If the target encoding is not set with
<span class="function"><a href="px_set_targetencoding.html" class="function">px_set_targetencoding()</a></span> this will be the encoding for
character fields when records are being accessed with
<span class="function"><a href="px_get_record.html" class="function">px_get_record()</a></span> or
<span class="function"><a href="px_retrieve_record.html" class="function">px_retrieve_record()</a></span>.
</p>
</dd>
</dl>
</div>
<div class="refsect1 seealso" id="refsect1-function.px-get-info-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="px_numfields.html" class="function" rel="rdfs-seeAlso">px_numfields()</a> - Returns number of fields in a database</span></li>
<li class="member"><span class="function"><a href="px_numrecords.html" class="function" rel="rdfs-seeAlso">px_numrecords()</a> - Returns number of records in a database</span></li>
</ul>
</p>
</div>
</div></div></div></body></html>