PHP & [removed] Image file description properties

2019-08-27 03:23发布

Image files come with description properties like title, subject and keyword (summary tab). How do I "get" these properties in PHP? is there a function that allows me to the same in Javascript?

2条回答
该账号已被封号
2楼-- · 2019-08-27 03:33

Regarding JavaScript, there is a script that will allow you to read EXIF information. It uses a rather complex technique using XMLHttpRequest.

Another technique (in its infancy) is to read the file on the client side, using the FileReader interface. An example of using FileReader to read EXIF data was posted on a Mozilla Hacks blog post.

I know you didn't mention EXIF at all and you want to access those Windows file properties. Honestly, I don't know how you'd acess those. You'd probably have to read certain bytes in the file, just like the script at the EXIF example from Mozilla Hacks does.

查看更多
一纸荒年 Trace。
3楼-- · 2019-08-27 03:36

Take a look at the exif_read_data() function within PHP.

Here is the official PHP documentation, and here's an example of it in use.

查看更多
登录 后发表回答