Can anyone advise on what is the best PHP function for displaying an image stored in a filesystem - file_get_contents or readfile. We are switching
file_get_contents
readfile
I should use fpassthru Using fopen you can handle errors more precisely.
PS: be sure, that your direct output from filesystem is not vulnerable!