note 10783 deleted from function.fopen by tularis

From: Date: Mon, 26 Dec 2005 14:28:12 +0000
Subject: note 10783 deleted from function.fopen by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-100739@lists.php.net to get a copy of this message
Note Submitter: defdac at hotmail dot com ---- Newbie advice: The little "b" for binary operations is very essential when working with PHP4 and Apache on the win32 platform. fread() only reads a couple of hundred bytes when reading for example an image without "b". // Read tempfile data into $thumb_img. $thumb_file_size = filesize('C:\\Temp\\temp.jpg'); $fp = fopen('C:\\Temp\\temp.jpg', "rb"); $thumb_data = addslashes (fread ($fp, $thumb_file_size)); fclose ($fp); unlink('C:\\Temp\\temp.jpg');

« previous php.notes (#100739) next »