在PHP中从MySQL BLOB读取字节

时间:2018-04-26 11:38:51

标签: php mysql blob php-7

我试图将BLOB字段读取为整数数组

(我想使用一个字节,但PHP中没有byte数据类型,对吗?)

这是我用一个blob字段读取数据的方式:

<?php
    $mysqli = mysqlConnect();
    $query = $mysqli->query("SELECT * FROM vectors LIMIT 2;");

    echo "\r";

    while ($row = mysqli_fetch_assoc($query)) 
    { 
        $date                  = $row["date"];   // DATETIME
        $vector                = $row["vector"]; // BLOB

        echo $date . "\t";

        $data = unpack("H*", $vector)[1];

        var_dump($data);
        echo "\n";
    }
?>

这是我的代码的产物:

2017-12-01  string(6226) "001829406f247ae147ae1401072d406f40a3d70a3d71010b23406f18f5c28f5c29010c01406f2147ae147ae1013b01406eed70a3d70a3d013b33406f0b851eb851ec020032406f20a3d70a3d7102080c406f40a3d70a3d71020e15406f1e147ae147ae02111c406f21999999999a02192f406f433333333333021c0c406ed75c28f5c28f02232e406ee051eb851eb802252b406ebd70a3d70a3d022533406ecf0a3d70a3d7022608406ee147ae147ae1023112406ebf0a3d70a3d702311a406ec3851eb851ec02393a406ee1eb851eb852030614406ebdc28f5c28f6030625406ec0a3d70a3d71032430406ee23d70a3d70a032905406eb8f5c28f5c29032b2a406ec28f5c28f5c3033022406ee051eb851eb8033a0e406ebae147ae147b033a16406ec3851eb851ec04241c406e780000000000042425406e86147ae147ae042633406eb7ae147ae148042729406ec851eb851eb8042930406e93851eb851ec042f09406ea5c28f5c28f6043110406e7e147ae147ae043118406e80f5c28f5c29043239406eabd70a3d70a4043316406ec0f5c28f5c2904331f406e8c28f5c28f5c043338406eb00000000000043405406ec1eb851eb852043427406e951eb851eb85043504406eb570a3d70a3d043515406ec851eb851eb804361d406e99eb851eb85204362d406ecb3333333333043722406e9ae147ae147b04372a406ea47ae147ae14043733406ec428f5c28f5c043b25406e9c7ae147ae1405002c406ea7ae147ae148050209406eceb851eb851f050222406e9eb851eb851f05022b406ea28f5c28f5c3050308406eca3d70a3d70a050524406e9f0a3d70a3d705052c406ec147ae147ae105062b406e9570a3d70a3d050708406ebb851eb851ec050a1a406ec147ae147ae1050a22406e96b851eb851f050a33406eb6b851eb851f050b08406ecfae147ae148052117406f2ccccccccccd053413406f43333333333306002d406f1fae147ae148060c2e406f280000000000061739406efccccccccccd06180e406f00a3d70a3d71062232406f2428f5c28f5c062814406effae147ae14806282e406f033333333333062c16406f275c28f5c28f063932406f428f5c28f5c3070025406f1fae147ae14807002e406f233333333333070519406f40f5c28f5c2907052a406f180000000000070835406f228f5c28f5c3070933406ef8a3d70a3d71070a11406f0bd70a3d70a4070e14406f2b3333333333070e36406ef9eb851eb852070f03406f051eb851eb85070f0b406f2570a3d70a3d071035406f4051eb851eb8071113406f1f5c28f5c28f071125406f2eb851eb851f071234406eff0a3d70a3d7071301406f051eb851eb85071309406f370a3d70a3d7071b03406ef947ae147ae1071b15406f19999999999a071d0c406f26b851eb851f07202e406eeeb851eb851f072339406f01eb851eb852072620406f351eb851eb8507263a406ef80000000000072720406f175c28f5c28f072f2e406f280000000000073708406efb851eb851ec073719406f0fae147ae148073817406f2570a3d70a3d08011d406eff5c28f5c28f080136406f023d70a3d70a082010406f23851eb851ec082318406effae147ae148082334406f0947ae147ae1090423406edb333333333309042b406ee147ae147ae1090d2d406f00f5c28f5c2909131e406edfae147ae148091508406ee147ae147ae10a132f406f023d70a3d70a0a1616406ed800000000000a1717406ee0f5c28f5c290a183b406ebf0a3d70a3d70a1919406ec800000000000a1d0d406ee0a3d70a3d710a2228406f4000000000000a2d02406f1147ae147ae10a2d0b406f23851eb851ec0a2f17406f56147ae147ae0a3208406efe66666666660a3232406f03851eb851ec0a3508406f247ae147ae140a3a09406f423d70a3d70a0a3a22406f1a8f5c28f5c30a3b09406f32e147ae147b0b0023406f49eb851eb8520b0236406f1eb851eb851f0b0302406f21999999999a0b030b406f43851eb851ec0b032f406f1d70a3d70a3d0b040e406f4b33333333330b1622406f61eb851eb8520b1c13406f3ae147ae147b0b1c32406f4570a3d70a3d0b390f406f1a8f5c28f5c30b3931406f2333333333330c0112406f40f5c28f5c290c0b0b406f1dc28f5c28f60c0b14406f21eb851eb8520c0e16406f46b851eb851f0d0001406f1bd70a3d70a40d001f406f20f5c28f5c290d032b406f43d70a3d70a40d0e2f406f1147ae147ae10d1107406f251eb851eb850d1323406f4428f5c28f5c0d152d406f1fae147ae1480d161d406f2051eb851eb80d1734406f4e147ae147ae0d1809406f18f5c28f5c290d182c406f3d1eb851eb850d1834406f4f5c28f5c28f0d191b406f1c28f5c28f5c0d1923406f45c28f5c28f60d1a0a406f0d70a3d70a3d0d1a1b406f2800000000000d1a24406f40f5c28f5c290d1b16406f1666666666660d1b27406f48a3d70a3d710d1c3a406f147ae147ae140d1d07406f3428f5c28f5c0d1d3a406f40f5c28f5c290d1e07406f1e66666666660d1e19406f32e147ae147b0d1f12406f50a3d70a3d710d1f23406eee66666666660d2213406ebb33333333330d221c406ec666666666660d2236406ee7ae147ae1480d2d2e406ebf0a3d70a3d70d2e04406ec4cccccccccd0d2e0d406ee7ae147ae1480e0229406f00f5c28f5c290e0603406f21eb851eb8520e0729406efe147ae147ae0e0732406f0333333333330e0a01406edb851eb851ec0e0a24406ee051eb851eb80e0e04406f00f5c28f5c290e1701406edfae147ae1480e170a406ee6147ae147ae0e1d30406f03d70a3d70a40f021f406edfae147ae1480f051c406ef7ae147ae1480f0a0d406ebeb851eb851f0f0a16406ec947ae147ae10f0e19406ee051eb851eb80f122c406ebfae147ae1480f130b406efccccccccccd0f1528406ebae147ae147b0f1531406ed6147ae147ae0f1607406ef147ae147ae10f1711406f02e147ae147b0f1936406f21eb851eb8520f2120406efae147ae147b0f2606406f033333333333102416406edc28f5c28f5c10241f406eeb3333333333103123406ebdc28f5c28f610312b406ec70a3d70a3d7103a1f406e9fae147ae148103a28406ea051eb851eb8110d1f406ec47ae147ae1411102c406e9e147ae147ae111035406ea70a3d70a3d7112733406ec1999999999a112835406e9c7ae147ae1411290a406ea8f5c28f5c29112a38406ec428f5c28f5c112c28406e9bd70a3d70a4112d07406ea47ae147ae1412041e406ec1999999999a120915406e9ccccccccccd120b26406ea23d70a3d70a12152f406ec147ae147ae1121a0b406e9eb851eb851f121a2f406ea80000000000121d2f406ec570a3d70a3d122411406e9f0a3d70a3d712241a406ea6147ae147ae123308406ec23d70a3d70a123b16406e9a8f5c28f5c3130106406ea147ae147ae1130903406ec147ae147ae1130e23406e966666666666131020406ea570a3d70a3d131a0c406ec0a3d70a3d71131d03406e9fae147ae148131d0c406ea051eb851eb813283a406ec23d70a3d70a132d03406e9e6666666666132f16406ea23d70a3d70a13320b406ec2e147ae147b133920406e9f5c28f5c28f133929406ea0f5c28f5c2914030f406ec570a3d70a3d140726406ee147ae147ae1140c39406ebfae147ae148140e19406ec0a3d70a3d7114140a406ee2e147ae147b14240a406ebeb851eb851f14241c406ecbd70a3d70a4142f06406ee3333333333314320b406ebfae147ae148143303406ec1999999999a150509406ee28f5c28f5c315080a406ebdc28f5c28f615081c406ed51eb851eb85150f36406ee47ae147ae1415191a406eb7ae147ae148151923406ed851eb851eb8151a1c406ee23d70a3d70a151e03406ebae147ae147b151e0c406edc28f5c28f5c151f20406ee51eb851eb85152113406ebf0a3d70a3d715211c406ed9999999999a152125406ee1999999999a15252b406f028f5c28f5c3160430406ed947ae147ae1160439406ee0f5c28f5c29160a19406f0147ae147ae1160d26406ed947ae147ae1160e20406ee4cccccccccd161000406f0147ae147ae1161b0f406edc28f5c28f5c161b18406ee4cccccccccd162114406f0051eb851eb816342b406f20a3d70a3d71163834406ef3d70a3d70a416391c406f0428f5c28f5c170e27406f233333333333170f26406efa8f5c28f5c3171719406f023d70a3d70a171b05406f270a3d70a3d717220c406eff0a3d70a3d7172215406f0428f5c28f5c172a13406f25c28f5c28f6173924406efae147ae147b17392c406f0a8f5c28f5c3"

2017-12-01  string(10538) "000f20406f280000000000001410406ef8a3d70a3d71001a05406f051eb851eb85002539406f247ae147ae14002a11406efc28f5c28f5c002c0c406f028f5c28f5c3003116406f22e147ae147b01010b406ef5c28f5c28f601012c406f03d70a3d70a401041e406f2051eb851eb8011b15406efd70a3d70a3d011d1d406f075c28f5c28f012115406f2f5c28f5c28f013026406ef75c28f5c28f013112406f051eb851eb85013737406f25c28f5c28f6013905406f45c28f5c28f6013b1b406f16b851eb851f020a1d406f20a3d70a3d7102110c406f48a3d70a3d7102140a406f166666666666021510406f20a3d70a3d71021a37406efc28f5c28f5c021b0c406f08f5c28f5c29021b37406f2a8f5c28f5c3021c0c406ec8a3d70a3d71021f1b406ee47ae147ae1402213a406eba3d70a3d70a022217406ec4cccccccccd02273a406ee0f5c28f5c29022908406ebe6666666666022919406ec051eb851eb8030812406e9c7ae147ae1403081a406ebc28f5c28f5c030823406ec3d70a3d70a4030b15406ee947ae147ae1030e07406ebeb851eb851f030e28406ec051eb851eb8032f2d406eeb333333333303372c406ebf5c28f5c28f033734406ec33333333333040622406ee1999999999a04063b406eb6b851eb851f040707406ed4cccccccccd041801406e9a8f5c28f5c3041825406ea23d70a3d70a041b01406ec147ae147ae1042415406e9e6666666666042634406ec00000000000042829406e9428f5c28f5c042832406ebae147ae147b04283a406ec0f5c28f5c29042931406e70a3d70a3d71042d19406e80a3d70a3d71042f09406ea6666666666604302a406ec570a3d70a3d043111406e96147ae147ae043122406eb8a3d70a3d71043132406ec8f5c28f5c29043218406e93851eb851ec043231406eb7ae147ae14804330e406ecd70a3d70a3d04331f406e91eb851eb852043339406eb051eb851eb8043405406ec66666666666043427406e870a3d70a3d7043505406eab333333333304350d406ec1999999999a043538406e833333333333043604406ea8f5c28f5c2904361d406e6f5c28f5c28f04362e406eae147ae147ae043722406e7f0a3d70a3d704372b406e82e147ae147b043734406ea80000000000043800406ec28f5c28f5c3043819406e92e147ae147b043830406ea851eb851eb8043916406ec1eb851eb852043b03406e97ae147ae148050209406eb0f5c28f5c29050309406eceb851eb851f05032c406e9c7ae147ae14050338406ea0a3d70a3d71050424406ecccccccccccd050513406e9dc28f5c28f605052d406ec1eb851eb85205062c406e89999999999a050709406eba3d70a3d70a05071a406ec2e147ae147b050804406e9e147ae147ae05080c406ea1999999999a050815406ec5c28f5c28f605090d406e9e666666666605091e406ebb3333333333050926406ecd70a3d70a3d050a2b406e9eb851eb851f050a34406ec428f5c28f5c050c07406e93d70a3d70a4050c18406eb051eb851eb8050c21406ec23d70a3d70a050d18406e7d1eb851eb85050d29406ea570a3d70a3d051215406ec28f5c28f5c3051330406e9a3d70a3d70a051405406ea6147ae147ae051523406ec3333333333305172a406ee47ae147ae14051c1d406ebeb851eb851f052118406f0f0a3d70a3d7052235406f20f5c28f5c29052a24406f41999999999a05321e406f180000000000053304406f21eb851eb852060613406efc28f5c28f5c06063b406f0851eb851eb8060e3b406f23851eb851ec061830406ef7ae147ae148061937406f00f5c28f5c29061d15406f2147ae147ae1061f2c406efeb851eb851f061f34406f023d70a3d70a062432406f251eb851eb85062b1b406efa8f5c28f5c3062b23406f028f5c28f5c3062f1a406f2f0a3d70a3d7063409406efeb851eb851f063423406f0147ae147ae1063835406f26b851eb851f070015406f43851eb851ec07022b406f14cccccccccd070608406edae147ae147b070611406ef70a3d70a3d707082d406f09eb851eb852070c1a406ed28f5c28f5c3070c33406ee51eb851eb85070e15406f080000000000070e37406ed851eb851eb8070f0c406f0570a3d70a3d071036406f30f5c28f5c2907111d406ef70a3d70a3d7071125406f1f5c28f5c28f071203406f31999999999a071235406ef28f5c28f5c307130a406f380000000000071513406effae147ae14807151b406f0051eb851eb8071601406f24cccccccccd07162c406ef6b851eb851f071701406f1fae147ae148071712406f247ae147ae14071839406ef6666666666607190e406f023d70a3d70a071f37406f22e147ae147b07202f406edc7ae147ae1407211b406ee0f5c28f5c29072621406f11999999999a07263a406ed70a3d70a3d7072718406ee66666666666072721406f1bd70a3d70a4072816406ec8a3d70a3d71072830406ee6b851eb851f072a02406f1b851eb851ec072e0a406f228f5c28f5c3072e34406ee428f5c28f5c072f26406f12e147ae147b073433406f2947ae147ae1073a0b406efe6666666666080436406f1147ae147ae1080b0e406ed51eb851eb85080c06406ee051eb851eb8080e1c406f00a3d70a3d71081426406ed6666666666608150d406ee428f5c28f5c081c1e406f01999999999a082008406eda3d70a3d70a082011406ee33333333333082527406f0570a3d70a3d08270d406ed9999999999a082715406ee0a3d70a3d7108292a406f0428f5c28f5c082b12406ed7ae147ae148082b34406ee28f5c28f5c3082e36406f00f5c28f5c29083033406edc28f5c28f5c08361e406ee570a3d70a3d083814406ebf0a3d70a3d708381d406ec1eb851eb852083a15406ee3851eb851ec09021d406f01eb851eb85209040a406ed428f5c28f5c090e26406ee28f5c28f5c3091610406ebe147ae147ae09170f406ec147ae147ae1091c14406ee8000000000009230f406ebccccccccccd092331406ec147ae147ae109262c406ee3d70a3d70a4092a17406ebd1eb851eb85092a20406ec6b851eb851f092b28406ee051eb851eb8093112406ebe147ae147ae09341b406eca8f5c28f5c3093832406eec28f5c28f5c0a0132406ebccccccccccd0a0219406ecd70a3d70a3d0a1104406ee570a3d70a3d0a1330406eb1eb851eb8520a1530406ec147ae147ae10a173a406e98f5c28f5c290a1810406ea5c28f5c28f60a1900406ec1999999999a0a192b406eea8f5c28f5c30a1e27406ebe66666666660a2016406ec051eb851eb80a2229406f2000000000000a2834406ef851eb851eb80a2922406f128f5c28f5c30a2934406f26147ae147ae0a2d03406efae147ae147b0a2f18406f2428f5c28f5c0a3122406efd1eb851eb850a312b406f028f5c28f5c30a351a406ede66666666660a360d406ee28f5c28f5c30a381d406f0570a3d70a3d0a3a2c406ede147ae147ae0a3b01406eee66666666660a3b09406f16147ae147ae0a3b23406f228f5c28f5c30a3b2c406efc28f5c28f5c0b0024406f0947ae147ae10b012d406f20a3d70a3d710b0236406ef6147ae147ae0b0303406f0051eb851eb80b030c406f2147ae147ae10b0330406ef947ae147ae10b040f406f19999999999a0b0417406f2147ae147ae10b0429406edae147ae147b0b0432406ee333333333330b043b406f0851eb851eb80b0623406f25c28f5c28f60b0f20406f40a3d70a3d710b1033406f1c28f5c28f5c0b103b406f27ae147ae1480b1511406f4051eb851eb80b182e406f60a3d70a3d710b1902406f3d1eb851eb850b2720406f428f5c28f5c30b2929406f1eb851eb851f0b293b406f2800000000000b2b35406f40f5c28f5c290b3506406f175c28f5c28f0b3807406f20f5c28f5c290c0028406f447ae147ae140c040e406f1d1eb851eb850c0620406f2147ae147ae10c0f0e406f41999999999a0c1438406f16b851eb851f0c1505406f223d70a3d70a0c1726406eff0a3d70a3d70c172e406f07ae147ae1480c180b406f25c28f5c28f60c2a32406f40a3d70a3d710c2e37406f1a8f5c28f5c30c3828406f2333333333330c3a23406efdc28f5c28f60c3a2c406f08a3d70a3d710d0002406f20f5c28f5c290d052e406eff0a3d70a3d70d0537406f0333333333330d0738406f23851eb851ec0d0f05406efbd70a3d70a40d0f1f406f0051eb851eb80d1300406ed7ae147ae1480d1309406f0d1eb851eb850d1324406f2147ae147ae10d1525406ee4cccccccccd0d1703406ebf0a3d70a3d70d170c406ecf0a3d70a3d70d172c406f023d70a3d70a0d1835406f2f5c28f5c28f0d1a0a406ef0f5c28f5c290d1a1c406f09eb851eb8520d1a25406f2a8f5c28f5c30d1b31406f4570a3d70a3d0d1c29406f1666666666660d1c32406f20a3d70a3d710d1d10406f451eb851eb850d1e08406ef0f5c28f5c290d1e22406f0051eb851eb80d1f24406eb3851eb851ec0d2013406ec47ae147ae140d202d406e96147ae147ae0d210b406ebf5c28f5c28f0d2113406ec8a3d70a3d710d2214406e9333333333330d2236406eaf5c28f5c28f0d2415406ec28f5c28f5c30d2721406eea3d70a3d70a0d2808406ebccccccccccd0d2811406ec70a3d70a3d70d2833406ee8a3d70a3d710d2a00406ebd70a3d70a3d0d2a09406ec666666666660d2d2f406e9c7ae147ae140d2d38406ea47ae147ae140d2e05406ed2e147ae147b0d3030406eee147ae147ae0d3709406ebfae147ae1480d3712406eceb851eb851f0e010e406eec28f5c28f5c0e1001406eba8f5c28f5c30e100a406ec51eb851eb850e1212406ee851eb851eb80e1d39406ebbd70a3d70a40e1e06406ec051eb851eb80e1e20406ee1eb851eb8520e2105406f01999999999a0e2333406eddc28f5c28f60e2607406ee051eb851eb80e2923406ebc28f5c28f5c0e292c406ec800000000000e2b03406ee428f5c28f5c0e3b15406ebe147ae147ae0e3b1e406ecf5c28f5c28f0e3b37406ee570a3d70a3d0f0220406eb4cccccccccd0f0232406ecbd70a3d70a40f0310406e9570a3d70a3d0f041c406ea47ae147ae140f042d406ec0a3d70a3d710f051d406efccccccccccd0f0730406ebfae147ae1480f0e2b406ed8f5c28f5c290f0f12406e951eb851eb850f0f1b406eb9eb851eb8520f0f35406ed3851eb851ec0f1025406e9e147ae147ae0f102d406ea51eb851eb850f1102406ed6147ae147ae0f111c406e9a8f5c28f5c30f1137406eafae147ae1480f1204406ed1999999999a0f122d406e9ae147ae147b0f1303406ea051eb851eb80f130c406ec2e147ae147b0f1518406ee1999999999a0f1520406eba8f5c28f5c30f153b406ec8a3d70a3d710f1723406ee23d70a3d70a0f1a2d406f0a8f5c28f5c30f1c1b406ed851eb851eb80f1c2c406eeccccccccccd0f1f27406f028f5c28f5c30f2031406ede147ae147ae0f203a406ee75c28f5c28f0f2a1c406f028f5c28f5c30f2c38406ed9eb851eb8520f2d04406ee1eb851eb8520f3615406f080000000000100005406ed70a3d70a3d7100031406ee2e147ae147b100210406ebae147ae147b100219406ecf0a3d70a3d7100309406ee2e147ae147b10061b406f01eb851eb852100b01406ed0a3d70a3d71100b24406ee051eb851eb810122c406f0147ae147ae110141e406edc28f5c28f5c101437406ee9999999999a10160f406f0947ae147ae1101b12406ed851eb851eb8101c1d406ee33333333333101f18406f02e147ae147b10230d406ed851eb851eb8102327406ee3851eb851ec102804406ebf0a3d70a3d710280c406ec9999999999a10291b406ee70a3d70a3d7102c37406eb051eb851eb8102f24406ecc7ae147ae1410320b406ee47ae147ae1410322e406ebf0a3d70a3d7103237406ed70a3d70a3d7103902406e93851eb851ec11050b406ea0a3d70a3d71110731406ec428f5c28f5c110a12406e9f5c28f5c28f110d20406ea8a3d70a3d71111012406e7e147ae147ae111024406e97ae147ae14811111d406ea0a3d70a3d71111d2e406e7f5c28f5c28f112014406e93333333333311211c406ea851eb851eb811232a406e7eb851eb851f112333406e83d70a3d70a4112535406ea5c28f5c28f611292e406ec1eb851eb852112a1e406e980000000000112a27406ea8f5c28f5c29112c3b406e7eb851eb851f112d08406ea3851eb851ec11393b406ec147ae147ae1120104406e9f0a3d70a3d712010d406eaae147ae147b120930406ec1999999999a120d08406e9eb851eb851f120d23406eae6666666666120d35406ec3851eb851ec120e1c406e9f5c28f5c28f120e25406ea0f5c28f5c29121633406ec051eb851eb8121a03406e9ae147ae147b121a0c406ea23d70a3d70a121e29406ec28f5c28f5c3121f22406e9f0a3d70a3d7121f2b406eaa3d70a3d70a122412406ec80000000000122808406e9eb851eb851f122b0d406ea7ae147ae148123017406e7e147ae147ae123020406e88f5c28f5c29123116406ea9999999999a123339406eca3d70a3d70a123713406e9f0a3d70a3d7123725406ea8a3d70a3d71123826406ec47ae147ae14123b17406e9f0a3d70a3d7123b31406ea28f5c28f5c3132333406ec6147ae147ae132739406e9d70a3d70a3d132b03406eafae147ae148132e38406ec1eb851eb85213311b406e9d1eb851eb85133203406ea0f5c28f5c29140321406ec1eb851eb85214062e406e975c28f5c28f14071e406eab3333333333140832406ec0a3d70a3d71141c2a406ee23d70a3d70a141e26406eb8000000000014240b406ecccccccccccd15060c406e96b851eb851f150626406ea570a3d70a3d150912406ecc28f5c28f5c150c10406e9d70a3d70a3d150c19406ea428f5c28f5c150d13406ec9999999999a150f2e406ee28f5c28f5c3151127406eb33333333333151130406ed428f5c28f5c151336406ee051eb851eb8151805406eb66666666666151821406ec28f5c28f5c3152011406ee28f5c28f5c3152935406f01999999999a152e37406edf5c28f5c28f152f27406ee1eb851eb852153509406f01eb851eb852160107406edb851eb851ec160122406ee2e147ae147b160431406ebb851eb851ec16043a406ed00000000000160611406ee33333333333161a3a406f047ae147ae14162231406edeb851eb851f162239406eedc28f5c28f6162d2a406f033333333333170d0e406ede6666666666170d17406eef0a3d70a3d7171017406f03851eb851ec172804406f2947ae147ae1172e24406ef9eb851eb852172f15406f0147ae147ae1173901406f20f5c28f5c29"

这就是我需要的:

2017-12-01  array(3113) { [0]=> int(0) [1]=> int(24) [2]=> int(41) ... }

2017-12-01  array(5269) { [0]=> int(0) [1]=> int(15) [2]=> int(32) ... }

我可能会拆分来自mysqli_fetch_assoc()的字符串并将十六进制值逐字节转换为整数,但我需要有效的方法来执行此操作,因为有很多数据要处理且服务器非常繁忙。 / p>

问题:

  1. 我可以使用mysqli读取BLOB作为数字数组而不会在字符串上浪费内存吗?

  2. 如果没有 - 我怎样才能有效地获取字节?

  3. 我使用PHP7,但如果需要,我可以使用旧版本。

0 个答案:

没有答案