uTools-Manuals/docs/php/rpm_open.html
2019-04-28 19:00:34 +08:00

83 lines
3.4 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>Opens an RPM file</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.rpm-open" class="refentry">
<div class="refnamediv">
<h1 class="refname">rpm_open</h1>
<p class="verinfo">(PECL rpmreader &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">rpm_open</span> &mdash; <span class="dc-title">Opens an RPM file</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.rpm-open-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>rpm_open</strong></span>
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
) : <span class="type">resource</span></div>
<p class="para rdfs-comment">
<span class="function"><strong>rpm_open()</strong></span> will open an RPM file and will
determine if the file is a valid RPM file.
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.rpm-open-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">filename</code></dt>
<dd>
<p class="para">
The filename of the RPM file you wish to open.
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.rpm-open-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
If the open succeeds, then <span class="function"><strong>rpm_open()</strong></span> will
return a file pointer resource to the newly opened file. On
error, the function will return <strong><code>FALSE</code></strong>.
</p>
</div>
<div class="refsect1 examples" id="refsect1-function.rpm-open-examples">
<h3 class="title">范例</h3>
<p class="para">
<div class="example" id="example-4238">
<p><strong>Example #1 <span class="function"><strong>rpm_open()</strong></span> example</strong></p>
<div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$file&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"/path/to/file.rpm"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$rpmr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">rpm_open</span><span style="color: #007700">(</span><span style="color: #0000BB">$file</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">rpm_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$rpmr</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
</div>
</div>
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.rpm-open-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="rpm_close.html" class="function" rel="rdfs-seeAlso">rpm_close()</a> - Closes an RPM file</span></li>
</ul>
</p>
</div>
</div></div></div></body></html>