ok im using php to read directory and then read the mp3 files in the directory and return the id3 tag info to flash....here is my code
Code:
<?php
require_once('mp3/getid3/getid3.php');
// Initialize getID3 engine
$getID3 = new getID3;
$filepath = 'mp3';
$handle = opendir($filepath);
while (false != ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != ".DS_Store" && $file != "getid3" && $file != "index.htm") {
$ThisFileInfo = $getID3->analyze($filepath.'/'.$file);
getid3_lib::CopyTagsToComments($ThisFileInfo);
if ($output) $output .= "|";
$output .= implode(', ', $ThisFileInfo['comments']['title']);
}
}
closedir($handle);
echo "&songs=$output&";
?>
the strange thing is half the time i get a page cannot be displayed error. the other half of the time the code works prefect. the folder doesnt change, the files dont change, nothing changes but for some reason the code doesnt work. im new to php but not new to programming and ive never had code work so strange.
here is the the address
here
please help
|