Re: Using a PEAR package
| From: | Norbert Mocsnik | Date: | Wed, 11 Feb 2004 00:19:29 +0000 |
| Subject: | Re: Using a PEAR package | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-10619@lists.php.net to get a copy of this message | ||
Hello Simon,
You are trying to use the methods of the package statically. Try:
<?
//MP3 ID test
require_once('ID.php');
$id3 = &new MP3_Id();
$id3->read('./summer.mp3');
$name = $id3->getTag('artists');
echo $name;
?>
Regards,
Norbert
Simon Green wrote:
I am new to PEAR, so please bear with me. I am trying ot use the MP3_Id package. The system is Win32 with ISS5.0 and php fully installed. I have installed PEAR correctly (I think) and I am stuck on how to use the package. I ran: php pear.php install MP3_Id to install the package. Hear is the sample script I am trying to run: <? //MP3 ID test require_once('ID.php'); MP3_Id::MP3_Id(1); MP3_Id::read('./summer.mp3'); $name=MP3_Id::getTag('artists'); echo($name); ?> And that returns this error: Notice: Undefined variable: this in C:\Inetpub\Public\www.jappihome.co.uk\ID.php on line 277 Notice: Undefined property: debug in C:\Inetpub\Public\www.jappihome.co.uk\ID.php on line 280 Fatal error: Call to undefined function: _read_v1() in C:\Inetpub\Public\www.jappihome.co.uk\ID.php on line 282 What is it i'm doing wrong? Thanks Simon