VALUES('$this->image_id','file_get_contents($tmp_image)')";
This code builds a string in PHP, but the function call file_get_contents($tmp_image) is not evaluated before the string is created.因此,未插入实际的二进制数据。
要解决这个问题,您需要明确地将函数的结果与函数呼叫:
VALUES('$this->image_id','" . file_get_contents($tmp_image) . "')";
Additionally, ensure that any characters in the binary data that might interfere with the query被逃脱了:
免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3