Reputation: 144
I am working with a stream_get_content the first time. Everything seems ok until i tried to read the content from the stream for the second time.
if my value that pass to the stream_get_content is repeating , return empty value !?
but if my value isn't repeating everything is good!!!!
public function makeAvatar($value)
{
$file_result = "data:image/gif;base64,";
$file_result .= base64_encode(stream_get_contents($value));
return $file_result;
}
Upvotes: 4
Views: 1275