如何解析WordPress的post_meta表值 [英] how to parse wordpress post_meta table values

查看:220
本文介绍了如何解析WordPress的post_meta表值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须解析wordpress post_meta 表,尤其是"_ wp_attachment_metadata"字段

I have to parse wordpress post_meta table , particularly "_wp_attachment_metadata" field

例如:

其值用于帖子ID = 99

Its value is for a post id = 99

> a:6:{s:5:"width";s:3:"238";s:6:"height";s:3:"179";s:14:"hwstring_small";s:23:"height='96'
> width='128'";s:4:"file";s:21:"2010/11/matt-lane.jpg";s:5:"sizes";a:1:{s:9:"thumbnail";a:3:{s:4:"file";s:21:"matt-lane-150x150.jpg";s:5:"width";s:3:"150";s:6:"height";s:3:"150";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}

我不明白它是如何编译的或如何在wordpress之外进行解析.我必须从wordpress到magento平台上,将最新的文章与帖子的所有数据集一起加载.

I didnt understand how it is compiled or how it can be parsed outside wordpress. The thing i si have to load the latest articles with all the data sets of post on magento platform from wordpress.

请帮助我解析此数据以获得src的图像.

please help me to parse this data to get the images src's.

预先感谢

推荐答案

尝试:

$a = unserialize("");
print_r($a);

http://php.net/manual/en/function.unserialize.php

这篇关于如何解析WordPress的post_meta表值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆