【发布时间】:2021-03-27 04:49:36
【问题描述】:
我正在开发一个程序来存储二进制图像数据,我决定将 memcached 用于缓存层。我实际上并没有收到任何错误,但是当我将二进制数据存储在其中时,它并不能正常工作。This is what the output of the array is , Look closely at where it says Profile_Pic, the value is just one character
This is the code I use to update the memcaches array. Note that storing regular
values in memcached works fine.
<?php $unit_array=$this->Memc->getByKey("Unit_Array_Casting_Server",$unit_name);
$unit_array[$uuid][$keyname]=$keyvalue;
$this->Memc->setByKey("Unit_Array_Casting_Server",$unit_name,$unit_array); ?>
【问题讨论】:
-
你有没有试过在存储之前对二进制数据进行base64?
-
是的,我有,但结果是一样的