Bug #18143 Updated: writing binary number as raw binary

From: Date: Wed, 03 Jul 2002 17:21:21 +0000
Subject: Bug #18143 Updated: writing binary number as raw binary
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-13012@lists.php.net to get a copy of this message
ID: 18143 Updated by: sander@php.net Reported By: ericksbr@infocon-inc.com -Status: Open +Status: Bogus Bug Type: Filesystem function related Operating System: Windows NT 4.0 SP 5 (Intel) PHP Version: 4.1.2 New Comment: Sorry, but the bug system is not the appropriate forum for asking support questions. Your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php Thank you for your interest in PHP. Hint: use chr() Previous Comments: ------------------------------------------------------------------------ [2002-07-03 12:57:28] ericksbr@infocon-inc.com Basically, what I want to do is write the hexadecimal value "0x0F000000L" out to a file, without it being converted to a string. I am using a C program to read the file and the results don't match. // #define COUNT_FLAG 0x0F000000L define("COUNT_FLAG", "251658240", FALSE); // define("COUNT_FLAG", "0x0F000000", FALSE); // Open file $fp = fopen($sTempFileName, "ab"); fwrite($fp, COUNT_FLAG); // Copy Count fwrite($fp, $nCopyCount); fwrite($fp, intval(COUNT_FLAG) ); fwrite($fp, serialize(intval($nCopyCount)) ); fclose($fp); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18143&edit=1

« previous php.bugs (#13012) next »