Hướng dẫn dùng mega tag trong PHP

Tôi biết bạn đã tìm ra giải pháp, nhưng điều này có thể giúp bất kỳ ai khác đang tìm kiếm điều tương tự!

Tôi đã sửa đổi một lớp mà tôi tìm thấy ở đây [cảm ơn debers ].

Và tất cả các tham chiếu đến thẻ IPTC có thể được đọc từ tệp PDF này

Và bây giờ là đoạn mã [PHP> = 5,4]:


17 hữu ích 1 bình luận chia sẻ

I have a small PHP script that grabs specific IPTC tags from an image file after uploading [see below]:

move_uploaded_file[$_FILES['file']['tmp_name'], 'uploads/' . $_FILES['file']['name']];

$size = getimagesize['uploads/' . $_FILES['file']['name'], $info];

if[isset[$info['APP13']]] { $iptc = iptcparse[$info['APP13']]; }

$title = $iptc["2#005"][0];
$artist = $iptc["2#025"][0];
$medium = $iptc["2#120"][0];
$date = $iptc["2#092"][0];
$credit = $iptc["2#080"][0];
$subject = $iptc["?????"][0];

All is well - except I can't for the life of me find the equivalent HEX value for the SubjectCode field! The IPTC reference documents list the value as "0x020C" - but that doesn't work. It's ID value is "2:12" according to the Adobe XMP docs. I'm stumped. Any gurus out there that can point me in the right direction?

1. Thêm code vào thẻ head là gì?

Thêm code vào giữa thẻ head trong header.php của Website WordPress đơn giản chỉ là chúng ta khai báo thêm một hoặc nhiều thẻ vào trước thẻ đóng . Code ở đây có thể là thẻ html, css, font hoặc các đoạn mã nhúng  javascript, jQuery….

    

Chủ Đề