如果使用 apt-get install getid3 安装,如何使用 getid3?

How to use getid3 if installed with apt-get install getid3?

我刚刚在我的 Debian 服务器上安装了 getid3:

apt-get install php-getid3

如何在我的网站上使用它?

我读到可以这样使用它:

require_once('getid3/getid3.php');
$getID3 = new getID3;
 $path = 'sample.mp3';
$mixinfo = $getID3->analyze( $path );

但我不知道在哪里 getid3.php 需要它。我该如何使用这个 php class?

您必须包含从 http://sourceforge.net/projects/getid3/?source=navbar 下载的文件 在你的 web 项目的一个文件夹中,然后你可以将库与代码一起使用,我建议你先看示例。