header("Content-type: ".$response->strExtension."");
header("Content-length: ".$response->intSize."");
header("Content-Disposition: attachment; filename=".basename( $response->strFileName )."");
exit(base64_decode($response->binFile));
Im generating an image using the above code. But when checking the generated image using notepad++ it has a newline before the data itself so I get error in opening the image. Like below:
How can I make sure that the generate file has no space or new lines.
Tried trimming the echoed base64_decode($response->binFile)
but it didnt do the job. No other echo are executed in this scenario.