ID3v1 yes - ID3v2 no.

The place for "I can't figure out how to..." questions.

ID3v1 yes - ID3v2 no.

Postby Kwed » Sun Nov 07, 2004 7:51 am

The following bit of code results in a "Could not open /var/tmp/getID3oyZUkG mode "wb" -" message. However, if I change the tagformats array to 'id3v1' it works great. Running v1.7.2, both target file and directory are writeable.

Any ideas?

--Jan, http://remix.kwed.org


[php]require_once('../getid3.php');
$getID3 = new getID3;
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'write.php', __FILE__);
$tagwriter = new getid3_writetags;
$tagwriter->filename = "./test.mp3";
$tagwriter->tagformats = array('id3v2.3');
$tagwriter->merge_existing_data = false;

$TagData['title'][] = 'My Song';
$TagData['artist'][] = 'The Artist';
$tagwriter->tag_data = $TagData;

if ($tagwriter->WriteTags()) {
echo 'success';
} else {
echo 'Failed to write tags!<br>'.implode('<br><br>', $tagwriter->errors);
}
[/php]
Kwed
 

Return to Support 1.x

Who is online

Users browsing this forum: Amalmcary and 3 guests

cron