A funny error:

software development

#1

I’m running this script:

[code]<?php
require_once (‘header.php’);
require_once(‘getid3/getid3/getid3.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?


#2

[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?


#3

class getid3
{

precedes the line returning the error.


#4

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


Jonathan
http://fleshy.org.nz/yum/


#5

Yes, I’m running PHP 5