A funny error:

I’m running this script:

require_once (‘header.php’);

ini_set (‘display errors’, 1);
error_reporting (E_ALL);

$getID3 = new getID3;
$dir = ‘/sermons’;
$result = scandir ($dir);
foreach ($result as $filen) {
$fileinfo = $getID3->analyze($file);
echo (@$getid3->info[‘comments_html’][‘title’]);

[/code]but it returns with the error, “Parse error: parse error, expecting T_OLD_FUNCTION' orT_FUNCTION’ or T_VAR' or‘}’’ in /Applications/MAMP/htdocs/revisited2/getid3/getid3/getid3.php on line 30”

Here’s line 30 of getid3.php:

public $encoding = 'ISO-8859-1';any idea what’s going on?

[quote]Here’s line 30 of getid3.php:
public $encoding = ‘ISO-8859-1’;[/quote]
Does line 29 (or the first non-whitespace line prior) have a semicolon or a right curly brace at the end of it?

class getid3

precedes the line returning the error.

are you running php5? If I recall correctly, ‘public’ is a php5-only language element.


Yes, I’m running PHP 5