用F函数写,代码会更简单:
$phiz = array(
'zhuakuang' => '抓狂',
'baobao' => '抱抱',
'haixiu' => '害羞',
'ku' => '酷',
'xixi' => '嘻嘻',
'taikaixin' => '太开心',
'touxiao' => '偷笑',
'qian' => '钱',
'huaxin' => '花心',
'jiyan' => '挤眼'
);
F('phiz', $phiz, './Data/'); // 写入
读取:
$phiz = F('phiz', '', './Data/'); // 注意第二个参数
p($phiz); //返回读取的数组