Mam taki problem. Na stronie powiny byc pobieran pliki, niestety nie jestem sobie w stanie poradzic z tym, zeby przy kazdym pliku nie bylo otwierane okno. Dokladnie w ie juz dziala, ale nie dziala pod mozia i opera...

Skrypt wyglada tak, moze jakies sugestie co do tego co zmienic?

Kod
if ($file <> ""){
$filename = $file; // the name the file will have on client computer
$file_to_download= "files/".$file; // the name the file has on the server (or an FTP or HTTP request)
$user_agent = strtolower ($_SERVER["HTTP_USER_AGENT"]);
header( "Content-type: application/force-download" );
if ((is_integer (strpos($user_agent, "msie"))) && (is_integer (strpos($user_agent, "win")))) {
  header( "Content-Disposition: filename=".$filename);
} else {
  header( "Content-Disposition: attachment; filename=".$filename);
}
header( "Content-Description: File Transfer");
@readfile($file_to_download);
}