On me dit que cela pourrait provenir d'un probleme de header avec la version PHP
tout ceci fonctinner normalement il y a encore quelques temps. Il est possible que mon hebergeur 1and1 ai mis à jour la version PHP et que depuis cela ne fonctionne plus ? Quelqu'un aurait une idée pour remédier à ce probléme ? merci
voici une partie de mon script de telechargement...
if ( $file_size && $ibforums->vars['ml_partial_transfers'] && isset($_SERVER['HTTP_RANGE']) )
{
@header("HTTP/1.1 206 Partial content\n");
$start = preg_replace( array("/(\040*|)bytes(\040*|)=(\040*|)/","/(\040*|)\-.*$/"), array("",""), $_SERVER['HTTP_RANGE'] );
if ( $file_size < $start )
{
@header("HTTP/1.1 411 Length Required\n");
exit();
}
$transfer_size = $file_size - $start;
@header("Accept-Ranges: bytes");
@header("Content-Range: bytes ".$transfer_size."-".($file_size - 1)."/".$file_size );
@header("Content-Length:".$transfer_size);
fseek($fh, $start);
}
else
{
@header("HTTP/1.0 200 OK");
@header("HTTP/1.1 200 OK");
if ( $file_size )
{
@header( "Content-Length: ".(string)($file_size) );
}
}
//-----------------------------------------
// Set up the headers..
//-----------------------------------------
@header("Cache-Control: no-cache, must-revalidate, max-age=0");
@header("Pragma: no-cache");
@header("Content-Type: ".$mime_type[ $file_ext ]."\nContent-Disposition: attachment; filename=\"".str_replace(" ", "_", $file_name));
@header("Content-Transfer-Encoding: binary");