hi,
I was writing some script, and there was one part that only works on IE (on my windows xp SP1) , but not on Mozilla, firefox, and IE with SP2
part of the code:
PHP:
mysql_query("UPDATE file SET accepted = 'n' WHERE filename ='".$file_name."'");
$file= '/home/public_html/files/'.$file_name;
if ( file_exists($file)) {
header("Cache-Control: must-revalidate");
$offset = 60 * 60 * 24 * 7;
$ExpireString = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
header($ExpireString);
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Content-Length: ".filesize($file));
header('Content-Type: audio/x-mpegurl');
readfile($file);
}
// the problem is the mysql statement,
if I comment the line out or move the line right after the last line: readfile($file), then everything would be fine for IE, mozilla, and firefox...
However, with the mysql query before the Header, mozilla, Firefox won't work.... I thought if I were to echo something before Header, then i would have problem .....in this case..it is a mysql statment....
//NOTE: having mysql query on the top is very crucial to my script! Any help or suggestion would be appricated
Thanks!


LinkBack URL
About LinkBacks



Reply With Quote
Good luck.

Bookmarks