比如,考试系统,在content.php里面可以看到,excel对应的字段。但是这个是怎么对应到qb_exam_content1数据表的呢?怎么把数据表修改为其它的数据表和字段(比如会员信息通过excel表导入),并且导入其它的excel内容呢?
盼老师指教!
//单选题 (单选1、多选2)
if($mid<3){
$rs[5] = $this->format_answer(str_replace(array("a","b","c","d"),array("1","2","3","4"),strtolower($rs[5])));
$data['title'] = $rs[0];
$data['answer_a'] = $rs[1];
$data['answer_b'] = $rs[2];
$data['answer_c'] = $rs[3]?:'';
$data['answer_d'] = $rs[4]?:'';
$data['answer'] = trim($rs[5],' ')?:'';
$data['content'] = $rs[6]?:'';
}else if($mid==3){ //判断题
$rs[1] = str_replace(array("正确","错误","对","错"),array("1","2","1","2"),$rs[1]);
$data['title'] = $rs[0];
$data['answer'] = trim($rs[1],' ');
$data['content'] = $rs[2]?:'';
}else if($mid==4){ //填空题
$data['title'] = $rs[0];
$data['answer'] = trim($rs[1],' ')?:'';
$data['content'] = $rs[2]?:'';
}else{
$this->error('未知题型,可联系管理员进行处理!');
}