mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-19 06:16:58 +08:00
101 lines
5.0 KiB
HTML
101 lines
5.0 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>Get version of an ID3 tag</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.id3-get-version" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">id3_get_version</h1>
|
|
<p class="verinfo">(PECL id3 >= 0.1)</p><p class="refpurpose"><span class="refname">id3_get_version</span> — <span class="dc-title">Get version of an ID3 tag</span></p>
|
|
|
|
</div>
|
|
<div class="refsect1 description" id="refsect1-function.id3-get-version-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>id3_get_version</strong></span>
|
|
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
|
|
) : <span class="type">int</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
<span class="function"><strong>id3_get_version()</strong></span> retrieves the version(s) of the
|
|
ID3 tag(s) in the MP3 file.
|
|
</p>
|
|
<p class="para">
|
|
If a file contains an ID3 v1.1 tag, it always contains
|
|
a 1.0 tag, as version 1.1 is just an extension of 1.0.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.id3-get-version-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">filename</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The path to the MP3 file
|
|
</p>
|
|
<p class="para">
|
|
Instead of a filename you may also pass a valid stream resource
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.id3-get-version-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
Returns the version number of the ID3 tag of the file.
|
|
As a tag can contain ID3 v1.x and v2.x tags, the return value of this
|
|
function should be bitwise compared with the predefined constants
|
|
<strong><code>ID3_V1_0</code></strong>, <strong><code>ID3_V1_1</code></strong> and
|
|
<strong><code>ID3_V2</code></strong>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 examples" id="refsect1-function.id3-get-version-examples">
|
|
<h3 class="title">范例</h3>
|
|
<p class="para">
|
|
<div class="example" id="example-648">
|
|
<p><strong>Example #1 <span class="function"><strong>id3_get_version()</strong></span> example</strong></p>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
<span style="color: #0000BB"><?php<br />$version </span><span style="color: #007700">= </span><span style="color: #0000BB">id3_get_version</span><span style="color: #007700">( </span><span style="color: #DD0000">"path/to/example.mp3" </span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">$version </span><span style="color: #007700">& </span><span style="color: #0000BB">ID3_V1_0</span><span style="color: #007700">) {<br /> echo </span><span style="color: #DD0000">"Contains a 1.x tag\n"</span><span style="color: #007700">;<br />}<br />if (</span><span style="color: #0000BB">$version </span><span style="color: #007700">& </span><span style="color: #0000BB">ID3_V1_1</span><span style="color: #007700">) {<br /> echo </span><span style="color: #DD0000">"Contains a 1.1 tag\n"</span><span style="color: #007700">;<br />}<br />if (</span><span style="color: #0000BB">$version </span><span style="color: #007700">& </span><span style="color: #0000BB">ID3_V2</span><span style="color: #007700">) {<br /> echo </span><span style="color: #DD0000">"Contains a 2.x tag\n"</span><span style="color: #007700">;<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>
|
|
Contains a 1.x tag
|
|
Contains a 1.1 tag
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.id3-get-version-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="id3_set_tag.html" class="function" rel="rdfs-seeAlso">id3_set_tag()</a> - Update information stored in an ID3 tag</span></li>
|
|
<li class="member"><span class="function"><a href="id3_get_tag.html" class="function" rel="rdfs-seeAlso">id3_get_tag()</a> - Get all information stored in an ID3 tag</span></li>
|
|
<li class="member"><span class="function"><a href="id3_remove_tag.html" class="function" rel="rdfs-seeAlso">id3_remove_tag()</a> - Remove an existing ID3 tag</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
</div></div></div></body></html> |