Hi all,

When I used exif_read_data() function, like this:

exif_read_data('/var/www/html/DF1A8638.jpg',0,TRUE); 
if (!$exif){
	echo "No EXIF data found.<br />\n";
}else{
	foreach ($exif as $key => $section) {
	   foreach ($section as $name => $val) {
	       echo $key.$name." : ".$val."\n";
	   }
	}
}

but I got many err messages below:

<br />
<b>Warning</b>: exif_read_data(DF1A8638.jpg): process tag(x0000=UndefinedTa): Illegal format code 0x0000, suppose BYTE in <b>/var/www/html/cht/viewphoto.php</b> on line <b>145</b><br />
<br />
<b>Warning</b>: exif_read_data(DF1A8638.jpg): process tag(x0000=UndefinedTa)
.
.
.

but under the err messages, it shows the correct exif data, please
help me how to fix this problem.... 😕

sorry for my English is not good....:bemused:

    Hi,

    in most cases this means that the exif headers are some kind of partly corrupt. Try

    @exif_read_data('/var/www/html/DF1A8638.jpg',0,TRUE);

    to suppress the warnings.
    Do you get the same warnings with
    exif_read_data('/var/www/html/DF1A8638.jpg',false);

    Thomas

      Originally posted by tsinka
      Hi,

      in most cases this means that the exif headers are some kind of partly corrupt. Try

      @exif_read_data('/var/www/html/DF1A8638.jpg',0,TRUE);

      to suppress the warnings.
      Do you get the same warnings with
      exif_read_data('/var/www/html/DF1A8638.jpg',false);

      Thomas

      Dear Thomas,

      I have fixed the bug by add '@'!!!

      Many Thanks!

      tubaboy

        Write a Reply...