Wordpress SQL格式在主题选项中

时间:2010-12-19 10:33:45

标签: wordpress-theming

我在wordpress主题选项表选项字段中遇到了这段代码:

a:34:{s:15:"generalsettings";N;s:0:"";N;s:12:"color_scheme";s:0:"";s:9:"site_name";s:0:"";s:11:"custom_logo";s:0:"";s:10:"twitter_id";s:48:"also include facebook username:this is a comment";s:13:"header_teaser";s:10:"customtext";s:12:"teaser_style";s:0:"";s:13:"teaser_custom";s:0:"";s:13:"cufon_disable";N;s:18:"breadcrumb_disable";N;s:14:"analytics_code";s:0:"";s:8:"homepage";N;s:11:"teaser_text";s:0:"";s:13:"teaser_button";s:2:"26";s:16:"mainpage_content";s:0:"";s:19:"home_teaser_disable";N;s:14:"slider_disable";s:1:"1";s:12:"slider_speed";s:0:"";s:15:"homepage_slider";s:6:"custom";s:15:"slider_showcats";s:0:"";s:12:"slider_count";s:0:"";s:4:"blog";N;s:9:"blog_page";s:0:"";s:16:"blog_excludecats";s:0:"";s:21:"related_popular_posts";N;s:16:"social_bookmarks";N;s:12:"about_author";N;s:7:"sidebar";N;s:14:"footersettings";N;s:11:"footer_text";s:0:"";s:14:"footer_include";s:0:"";s:11:"navsettings";N;s:12:"show_hide_pg";s:0:"";}

这是什么格式,我在哪里可以找到更多相关信息?

1 个答案:

答案 0 :(得分:0)

不完全是数组。它们是序列化数据。你可以使用unserialize函数将其还原,在这个例子中,它是数组! =)

Array ( [generalsettings] => [] => [color_scheme] => [site_name] => [custom_logo] => [twitter_id] => also include facebook username:this is a comment [header_teaser] => customtext [teaser_style] => [teaser_custom] => [cufon_disable] => [breadcrumb_disable] => [analytics_code] => [homepage] => [teaser_text] => [teaser_button] => 26 [mainpage_content] => [home_teaser_disable] => [slider_disable] => 1 [slider_speed] => [homepage_slider] => custom [slider_showcats] => [slider_count] => [blog] => [blog_page] => [blog_excludecats] => [related_popular_posts] => [social_bookmarks] => [about_author] => [sidebar] => [footersettings] => [footer_text] => [footer_include] => [navsettings] => [show_hide_pg] => )