/** * saveContants * 存储通讯录 * @access private * @return void */ private function saveContants() { $ret = array("succ" => TRUE, "msg" => array()); $excel = new Excel(); $contantsArr = $excel->readExcel($this->_filePath, $this->_activeSheet, $this->_headers); foreach ($contantsArr['contents'] as $key => $contant) { if (FALSE === $this->contantsAddAttr($contant[0], $contant[1], $contant[2], $contant[3])) { $ret['msg'] = FALSE; array_push($ret['msg'], "{$contant[3]} 插入失败"); } } return $ret; }