|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-09-20 08:50 UTC] svn@php.net
[2009-09-20 08:50 UTC] torben@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 07:00:01 2026 UTC |
Description: ------------ Two problems with the example code on the documentation page, and as a result, the code does not work: 1) The code is incomplete. The $content variable must be written to the image file to apply the changes - that is, to write the iptc data to the image file. The following code must be added at the end of the example: $fp = fopen($path, "wb"); fwrite($fp, $content); fclose($fp); 2) The $tag variable is being "substr" twice, but this should only be done once. The existing code is this: $tag = substr($tag, 2); $data .= iptc_make_tag(2, substr($tag, 2), $string); And should be changed to this: $data .= iptc_make_tag(2, substr($tag, 2), $string); Reproduce code: --------------- --- From manual page: function.iptcembed ---