当前位置: 首页>>代码示例>>PHP>>正文


PHP FileUtil::exportCsv方法代码示例

本文整理汇总了PHP中FileUtil::exportCsv方法的典型用法代码示例。如果您正苦于以下问题:PHP FileUtil::exportCsv方法的具体用法?PHP FileUtil::exportCsv怎么用?PHP FileUtil::exportCsv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileUtil的用法示例。


在下文中一共展示了FileUtil::exportCsv方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionExport

 public function actionExport()
 {
     $checkids = EnvUtil::getRequest("checkids");
     $bgcheckArr = ResumeBgchecks::model()->fetchAll("FIND_IN_SET(checkid, '{$checkids}')");
     $fieldArr = array(Ibos::lang("Name"), Ibos::lang("Company name"), Ibos::lang("Position"), Ibos::lang("Entry time"), Ibos::lang("Departure time"), Ibos::lang("Details"));
     $str = implode(",", $fieldArr) . "\n";
     foreach ($bgcheckArr as $bgcheck) {
         $realname = ResumeDetail::model()->fetchRealnameByResumeid($bgcheck["resumeid"]);
         $company = $bgcheck["company"];
         $position = $bgcheck["position"];
         $entryTime = empty($bgcheck["entrytime"]) ? "" : date("Y-m-d", $bgcheck["entrytime"]);
         $quitTime = empty($bgcheck["quittime"]) ? "" : date("Y-m-d", $bgcheck["quittime"]);
         $detail = $bgcheck["detail"];
         $str .= $realname . "," . $company . "," . $position . "," . $entryTime . "," . $quitTime . "," . $detail . "\n";
     }
     $outputStr = iconv("utf-8", "gbk//ignore", $str);
     $filename = date("Y-m-d") . mt_rand(100, 999) . ".csv";
     FileUtil::exportCsv($filename, $outputStr);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:19,代码来源:BgchecksController.php

示例2: actionExport

 public function actionExport()
 {
     $contactids = EnvUtil::getRequest("contactids");
     $contactArr = ResumeContact::model()->fetchAll("FIND_IN_SET(contactid, '{$contactids}')");
     $fieldArr = array(Ibos::lang("Name"), Ibos::lang("Contact date"), Ibos::lang("Contact staff"), Ibos::lang("Contact method"), Ibos::lang("Contact purpose"), Ibos::lang("Content"));
     $str = implode(",", $fieldArr) . "\n";
     foreach ($contactArr as $contact) {
         $realname = ResumeDetail::model()->fetchRealnameByResumeid($contact["resumeid"]);
         $input = User::model()->fetchRealnameByUid($contact["input"]);
         $inputtime = empty($contact["inputtime"]) ? "" : date("Y-m-d", $contact["inputtime"]);
         $method = $contact["contact"];
         $purpose = $contact["purpose"];
         $detail = $contact["detail"];
         $str .= $realname . "," . $inputtime . "," . $input . "," . $method . "," . $purpose . "," . $detail . "\n";
     }
     $outputStr = iconv("utf-8", "gbk//ignore", $str);
     $filename = date("Y-m-d") . mt_rand(100, 999) . ".csv";
     FileUtil::exportCsv($filename, $outputStr);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:19,代码来源:ContactController.php

示例3: export

 public function export()
 {
     $userDatas = $this->getUserData();
     $fieldArr = array(Ibos::lang("Real name"), Ibos::lang("Position"), Ibos::lang("Telephone"), Ibos::lang("Cell phone"), Ibos::lang("Email"), Ibos::lang("QQ"));
     $str = implode(",", $fieldArr) . "\n";
     foreach ($userDatas as $user) {
         $realname = $user["realname"];
         $posname = $user["posname"];
         $telephone = $user["telephone"];
         $mobile = $user["mobile"];
         $email = $user["email"];
         $qq = $user["qq"];
         $str .= $realname . "," . $posname . "," . $telephone . "," . $mobile . "," . $email . "," . $qq . "\n";
     }
     $outputStr = iconv("utf-8", "gbk//ignore", $str);
     $filename = date("Y-m-d") . mt_rand(100, 999) . ".csv";
     FileUtil::exportCsv($filename, $outputStr);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:18,代码来源:ContactBaseController.php

示例4: actionExport

 public function actionExport()
 {
     $interviews = EnvUtil::getRequest("interviews");
     $interviewArr = ResumeInterview::model()->fetchAll("FIND_IN_SET(interviewid, '{$interviews}')");
     $fieldArr = array(Ibos::lang("Name"), Ibos::lang("Interview time"), Ibos::lang("Interview people"), Ibos::lang("Interview types"), Ibos::lang("Interview process"));
     $str = implode(",", $fieldArr) . "\n";
     foreach ($interviewArr as $interview) {
         $realname = ResumeDetail::model()->fetchRealnameByResumeid($interview["resumeid"]);
         $time = empty($interview["interviewtime"]) ? "" : date("Y-m-d", $interview["interviewtime"]);
         $interviewer = User::model()->fetchRealnameByUid($interview["interviewer"]);
         $type = $interview["type"];
         $process = $interview["process"];
         $str .= $realname . "," . $time . "," . $interviewer . "," . $type . "," . $process . "\n";
     }
     $outputStr = iconv("utf-8", "gbk//ignore", $str);
     $filename = date("Y-m-d") . mt_rand(100, 999) . ".csv";
     FileUtil::exportCsv($filename, $outputStr);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:18,代码来源:InterviewController.php


注:本文中的FileUtil::exportCsv方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。