Fix the problem (by Mohsen) when fpassthru is disabled.

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@657 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2009-09-08 14:58:36 +00:00
parent fa4358687c
commit 20128757fc

View File

@ -60,6 +60,14 @@ $filename = "locales/${lang}/button/${image}_${image_postfix}.gif";
$fp = fopen($filename, 'rb') or die("no image");
header("Content-Type: image/gif");
header("Content-Length: ".filesize($filename));
fpassthru($fp);
if(function_exists('fpassthru')){
@fpassthru($fp);
} else {
while( (!feof($fp)) && (connection_status()==0)){
print(fread($fp, 1024*8));
flush();
}
fclose($fp);
}
exit;
?>