Displaying image with php

Posted by Hank Denijm on Stack Overflow See other posts from Stack Overflow or by Hank Denijm
Published on 2010-05-03T10:04:02Z Indexed on 2010/05/03 10:08 UTC
Read the original article Hit count: 257

Filed under:
|

I have a script which displays images like this:

header("Content-Type: image/{$ext}"); readfile($image->path);

This has worked fine for weeks and now suddenly it has stopped working. The response header looks fine (Content-Type: image/jpg), I have no ending php-tag and I have made no changes to my code, server- or php-setup which could have caused this to malfunction. Does anyone have a clue as to what may be going wrong?

Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about image