Hey - this is weird, and I think it's a Windows glitch. I can't seem to get binary image data to show in my browser reliably.
Here's the code to display an image:
header("Content-type: image/jpeg");
@readfile('secretdirectory/image.jpg');
Now, for some reason, if I try to display a thumbnail image, it works ...but a larger image (over about 100k) fails in random ways... sometimes I get part of the image with garbage, other times I get the red 'x' icon but the height and width are right (IE draws an outline), but most of the time I get just a total failure with a "can't load this page" error.
I have looked at the images in the secretdirectory/ and they load fine with various JPG viewers; they are not corrupt.
Since it breaks only on larger images (small images load and display perfectly every single time), I suspect this is some weird interaction with Windows and PHP... I'm running 4.2.1 on Win XP.
Any ideas??
thanks
Eric