|
-
Apr 28th, 2006, 07:23 AM
#1
Thread Starter
Frenzied Member
Help with Parse error: syntax error, unexpected ';', expecting ')'
Hi all i tried the following php script but when i run it i get the following error:
Code:
Parse error: syntax error, unexpected ';', expecting ')' in www\remote.php on line 35
I put ')' after Arry( to make it like Array() but still i get the above error. So i be happy if an expert tell me how to fix it. Thanks
The bold part shows the error line:
Code:
<?
// Copy remote file locally to scan with getID3()
$remotefilename = 'http://ww.remoteserver.com/song.mp3';
if ($fp_remote = fopen($remotefilename, 'rb')) {
$localtempfilename = tempnam('/tmp', 'getID3');
if ($fp_local = fopen($localtempfilename, 'wb')) {
while ($buffer = fread($fp_remote, 8192)) {
fwrite($fp_local, $buffer);
}
fclose($fp_local);
// Initialize getID3 engine
$getID3 = new getID3;
$ThisFileInfo = $getID3->analyze($filename);
// Delete temporary file
unlink($localtempfilename);
}
fclose($fp_remote);
}
// Writing tags:
require_once('getid3.php');
$getID3 = new getID3;
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'write.php', __FILE__);
$tagwriter = new getid3_writetags;
$tagwriter->filename = $Filename;
$tagwriter->tagformats = array('id3v2.3', 'ape');
$TagData['title'][] = 'Song Title';
$TagData['artist'][] = 'Artist Name';
$tagwriter->tag_data = array(; ===> error here
if ($tagwriter->WriteTags()) {
echo 'success';
} else {
echo 'failure';
}
<?
-
Apr 28th, 2006, 07:28 AM
#2
<?="Moderator"?>
Re: Help with Parse error: syntax error, unexpected ';', expecting ')'
PHP Code:
$tagwriter->tag_data = array(;
is ment to be
PHP Code:
$tagwriter->tag_data = array();
As the error said you were missing the closing ) on the array decleration.
-
Apr 28th, 2006, 07:30 AM
#3
Thread Starter
Frenzied Member
Re: Help with Parse error: syntax error, unexpected ';', expecting ')'
 Originally Posted by john tindell
PHP Code:
$tagwriter->tag_data = array(;
is ment to be
PHP Code:
$tagwriter->tag_data = array();
As the error said you were missing the closing ) on the array decleration.
Thank for u reply. I tried that already did not work!!
-
Apr 28th, 2006, 09:26 AM
#4
Re: Help with Parse error: syntax error, unexpected ';', expecting ')'
You clearly have another error then.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|