в кодировании есть такая строка при создании ключа
$rest = $p->bits / 8 - $content_size;
if ($rest < 0)
die("Content is too big to fit in key: ".$content_size.", maximal allowed is: ".($p->bits /
![Cool 8)](./images/smilies/icon_cool.gif)
в поле userdata записывается последвоательность байт
Code: Select all
Массив ( [0] => 16390 [1] => 32000 [2] => 16394 [3] => 32000 [4] => 16395 [5] => 32000 [6] => 16396 [7] => 32000 [8] => 16397 [9] => 32000 [10] => 16399 [11] => 32000 [12] => 17400 [13] => 32000 [14] => 17401 [15] => 32000 [16] => 17402 [17] => 32000 [18] => 17403 [19] => 32000 [20] => 17405 [21] => 32000 [22] => 17407 [23] => 32000 [24] => 17408 [25] => 32000 [26] => 17409 [27] => 32000 [28] => 17410 [29] => 32000 [30] => 17411 [31] => 32000 [32] => 17412 [33] => 32000 [34] => 17413 [35] => 32000 [36] => 17414 [37] => 32000 [38] => 17415 [39] => 32000 [40] => 17416 [41] => 32000 [42] => 17417 [43] => 32000 [44] => 17418 [45] => 32000 [46] => 17419 [47] => 32000 [48] => 17420 [49] => 32000 [50] => 17421 [51] => 32000 [52] => 17422 [53] => 32000 [54] => 17423 [55] => 32000 [56] => 17424 [57] => 32000 [58] => 17425 [59] => 32000 [60] => 17426 [61] => 32000 [62] => 17428 [63] => 32000 [64] => 17429 [65] => 32000 [66] => 17430 [67] => 32000 [68] => 17431 [69] => 32000 [70] => 17432 [71] => 32000 [72] => 17433 [73] => 32000 [74] => 17434 [75] => 32000 [76] => 17427 [77] => 32000 [78] => 17436 [79] => 32000 [80] => 17438 [81] => 32000 [82] => 17437 [83] => 32000 [84] => 17439 [85] => 32000 [86] => 17442 [87] => 32000 [88] => 17440 [89] => 32000 [90] => 17441 [91] => 32000
массив byte
06000a000b000c000d000f00f800f900fa00fb00fd00ff0000000100020003000400050006000700080009000a000b000c000d000e000f001000110012001400150016001700180019001a0013001c001e001d001f00220020002100
Code: Select all
print_r($a);
echo '<br>';
$packed =
array_reduce($a, function($carry, $item) {
return $carry .= pack('C*', $item);
});
echo bin2hex ($packed);
но выдается сообщение: Content is too big to fit in key: 326, maximal allowed is: 256
при уменьшении размера массива - все работает нормально
в чем я ошибаюсь? уже всю голову сломал