这是什么数据格式?解决思路
程序员文章站
2022-06-02 21:17:19
...
这是什么数据格式?
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;}
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 序列化数据
(
[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
)
------解决方案--------------------
序列化之后的格式,可用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;}Array
TXT;
print_r(unserialize($s));
(
[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
)
相关文章
相关视频
专题推荐
-
独孤九贱-php全栈开发教程
全栈 170W+
主讲:Peter-Zhu 轻松幽默、简短易学,非常适合PHP学习入门
-
玉女心经-web前端开发教程
入门 80W+
主讲:灭绝师太 由浅入深、明快简洁,非常适合前端学习入门
-
天龙八部-实战开发教程
实战 120W+
主讲:西门大官人 思路清晰、严谨规范,适合有一定web编程基础学习
上一篇: 怎么将sql sever中的数据导入到mysql中?
下一篇: PHP 按位取反的有关问题
推荐阅读
-
解释这句话中#@是什么意思,Select * From `@_abc`这是mysql语句,sql server有这种写法吗?解决方法
-
php为什么用$_SESSION会出错?解决思路
-
php中的nocache是什么意思解决思路
-
用什么方法判断提交是否为URL,最好别用正则解决思路
-
php apc locking type是什么解决思路
-
求大神们速速围观,这个编辑器叫什么?解决思路
-
The mysql extension is deprecated and will be removed in the future,这是什么原因啊解决方法
-
这是一段文件下载的代码,为什么下载之后的文件总是空的呢解决办法
-
棒棒忙这个函数到底是讲的什么意思啊解决思路
-
window.onload到底是在什么东西加载完?解决思路
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论