Ok...
Questo è lo script estrai_dati.php che viene eseguito per ogni file (è incluso nello script più "generale").
Le variabili $filename, $e e $f esistono...
Codice PHP:
$filename="./brani/$e/$f";
$fp = fopen( $filename, 'r');
$info = array();
$info['size'] = filesize( $filename );
$info['name'] = basename( $filename );
$info['path'] = dirname( $filename );
// mi sembra sia questo ciclo while che vada in loop
$done = false;
while( $done == false ) {
$working = fread( $fp, 1 );
if( $working == "l" ) {
$working .= fread( $fp, 8 );
if( $working == "libVorbis" ) {
$done = true;
//echo ("sergio");
}
}
}
while( ord( $working ) > 31 ) {
$working = fread( $fp, 1 );
}
$tag = "";
while( $tag != "done" ) {
$working = "";
while( ( $working != "=" ) && ( $tag != "done" ) ) {
if( ord( $working ) > 31 ) {
$tag .= $working;
}
$working = fread( $fp, 1 );
if( $tag == "v" ) {
$tag .= "o".fread( $fp, 9 );
if( ( substr_count( $tag, "vorbis" ) == 1 ) && ( substr_count( $tag, "BCV" ) == 1 ) ) {
$tag = "done";
} else {
fseek( $fp, ( ftell( $fp ) - 10 ) );
}
}
}
if( $tag != "done" ) {
$working = fread( $fp, 1 );
while( ord( $working ) > 31 ) {
$title .= $working;
$working = fread( $fp, 1 );
}
$info[$tag] = $title;
$tag = "";
$title = "";
}
}
fclose( $fp );
return $info;
Probabilmente c'è qualche ciclo che entra in loop...
Ho segnato con un commento il punto dove sembra incasinarsi...
Sergej
Ps: che mi dici per quanto riguarda i permessi dei file?