Date: 09/17/00
- Next message: alain <email protected>: "[PHP-DEV] PHP 4.0 Bug #6785: { needs to be backslashed if followed by a variable"
- Previous message: stu <email protected>: "[PHP-DEV] PHP 4.0 Bug #6782: urlencode() doesn't seem to encode anything"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
c>> $binary_value = 0x0c;
c>>
c>> echo gettype($binary_value) . "\n";
c>> printf("0x%02x\n", $binary_value);
c>>
c>> $fh = fopen(TEST_FILE, "wb"); /* b is ignored under UNIX */
c>> fwrite($fh, $binary_value); /* always converts to string... */
I guess you should use sprintf or pack here if you really want to work
with binary data.
-- Stanislav Malyshev stas <email protected> http://www.zend.com/ +972-3-6139665 ext.106-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: alain <email protected>: "[PHP-DEV] PHP 4.0 Bug #6785: { needs to be backslashed if followed by a variable"
- Previous message: stu <email protected>: "[PHP-DEV] PHP 4.0 Bug #6782: urlencode() doesn't seem to encode anything"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

