Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在名为“”的表中有 buddypress 的数据,wp_bp_xprofile_data其中包含如下字段
wp_bp_xprofile_data
"a:2:{i:0;s:10:"myproject";i:1;s:5:"其他";}"
它是什么样的数据?肯定不是 JSON ......
它是 PHP 序列化数据。你可以用unserialize()
unserialize()
http://php.net/manual/en/function.unserialize.php
重新序列化配置文件数据:
$value = bp_get_profile_field_data(‘field=some_serialized_field’); $value = bp_unserialize_profile_field($value);