Despite setting directory permissions to 777, I still can’t get a PHP script to write an image file that it generated to a directory on the server. So, rather than wrestling with that problem I thought, why not create a new one. Actually, I thought there might be an easier solution. Is it possible to take an image file (stream) that is generated on the server and “trick” the client so that the file doesn’t have to exist in a directory on the server, so that the results can just be handed directly to the browser?
Share
Sure. Let’s say you have the binary data in variable
$im. Just do:PHP is perfectly capable of outputting non-HTML data.