PHP 8.5.0 Alpha 2 available for testing

Voting

: eight minus seven?
(Example: nine)

The Note You're Voting On

irishcybernerd at email dot com
22 years ago
Rather than using the temporary file, as described above, you can buffer the output stream. Someone else showed me this, and it seems to work very nicely.

//Start buffering the output stream
ob_start();

// output the image as a file to the output stream
Imagejpeg($im);

//Read the output buffer
$buffer = ob_get_contents();

//clear the buffer
ob_end_clean();

//use $buffer as you wish...

<< Back to user notes page

To Top