小编Roo*_*oud的帖子

Stream_get_content 第二次不工作?

我第一次使用 stream_get_content 。一切似乎都很好,直到我第二次尝试从流中读取内容。

如果我传递给 stream_get_content 的值是重复的,则返回空值!?

但如果我的价值不是重复一切都很好!!!!

public function makeAvatar($value)
{
    $file_result = "data:image/gif;base64,";
    $file_result .= base64_encode(stream_get_contents($value));
    return $file_result;
}
Run Code Online (Sandbox Code Playgroud)

php streaming

4
推荐指数
1
解决办法
935
查看次数

标签 统计

php ×1

streaming ×1