From 20128757fc9f2430d3ced24218d2191d08d46925 Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Tue, 8 Sep 2009 14:58:36 +0000 Subject: [PATCH] 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 --- src/messenger/webim/button.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/messenger/webim/button.php b/src/messenger/webim/button.php index 3b81d29f..3243cd78 100644 --- a/src/messenger/webim/button.php +++ b/src/messenger/webim/button.php @@ -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; ?> \ No newline at end of file