欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

这是什么数据格式?解决思路

程序员文章站 2024-01-01 23:21:28
...
这是什么数据格式?
a:24:{s:8:"duration";i:900;s:8:"redoable";s:2:"20";s:8:"onebyone";s:1:"0";s:7:"answers";s:1:"1";s:13:"given_answers";s:1:"1";s:17:"shuffle_questions";s:1:"1";s:15:"shuffle_answers";s:1:"1";s:17:"general_threshold";i:50;s:12:"master_score";i:50;s:11:"random_pool";i:0;s:17:"user_configurable";i:0;s:16:"maintain_history";s:1:"5";s:12:"display_list";s:1:"0";s:10:"pause_test";s:1:"1";s:15:"display_weights";s:1:"1";s:12:"only_forward";s:1:"0";s:10:"answer_all";s:1:"0";s:10:"redo_wrong";i:0;s:8:"redirect";s:1:"0";s:13:"assign_to_new";N;s:20:"automatic_assignment";N;s:20:"show_answers_if_pass";s:1:"1";s:15:"show_incomplete";i:0;s:13:"test_password";i:0;}
数据格式
------解决方案--------------------
序列化之后的格式,可用unserialize() 还原。
------解决方案--------------------
php 序列化数据
$s = 
a:24:{s:8:"duration";i:900;s:8:"redoable";s:2:"20";s:8:"onebyone";s:1:"0";s:7:"answers";s:1:"1";s:13:"given_answers";s:1:"1";s:17:"shuffle_questions";s:1:"1";s:15:"shuffle_answers";s:1:"1";s:17:"general_threshold";i:50;s:12:"master_score";i:50;s:11:"random_pool";i:0;s:17:"user_configurable";i:0;s:16:"maintain_history";s:1:"5";s:12:"display_list";s:1:"0";s:10:"pause_test";s:1:"1";s:15:"display_weights";s:1:"1";s:12:"only_forward";s:1:"0";s:10:"answer_all";s:1:"0";s:10:"redo_wrong";i:0;s:8:"redirect";s:1:"0";s:13:"assign_to_new";N;s:20:"automatic_assignment";N;s:20:"show_answers_if_pass";s:1:"1";s:15:"show_incomplete";i:0;s:13:"test_password";i:0;}
TXT;

print_r(unserialize($s));
Array
(
[duration] => 900
[redoable] => 20
[onebyone] => 0
[answers] => 1
[given_answers] => 1
[shuffle_questions] => 1
[shuffle_answers] => 1
[general_threshold] => 50
[master_score] => 50
[random_pool] => 0
[user_configurable] => 0
[maintain_history] => 5
[display_list] => 0
[pause_test] => 1
[display_weights] => 1
[only_forward] => 0
[answer_all] => 0
[redo_wrong] => 0
[redirect] => 0
[assign_to_new] =>
[automatic_assignment] =>
[show_answers_if_pass] => 1
[show_incomplete] => 0
[test_password] => 0
)
这是什么数据格式?解决思路

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频


网友评论

文明上网理性发言,请遵守 新闻评论服务协议

我要评论
  • 这是什么数据格式?解决思路
  • 专题推荐

    上一篇:

    下一篇: