Displaying image with php
- by Hank Denijm
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!