PHP/(bad) exif data/warnings, what to do?

后端 未结 2 1039
星月不相逢
星月不相逢 2020-12-06 18:55

I\'m writing a small script that gathers a couple exif values from images... namely the creation date, make and model.

I\'m noticing (particularly with image mailed

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-06 18:56

    You can use the @ operator to hide the warning without using display_errors, i.e.

    $exif = @exif_read_data(..);
    

    That's better than setting display_errors because it silences warnings/errors on the exif read function only, and does not hide other possible errors in your code.

提交回复
热议问题