本文整理汇总了PHP中ExportToCSV函数的典型用法代码示例。如果您正苦于以下问题:PHP ExportToCSV函数的具体用法?PHP ExportToCSV怎么用?PHP ExportToCSV使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ExportToCSV函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ExportToExcel_old
} else {
ExportToExcel_old($cipherer);
}
} else {
if (@$_REQUEST["type"] == "word") {
ExportToWord($cipherer);
} else {
if (@$_REQUEST["type"] == "xml") {
ExportToXML($cipherer);
} else {
if (@$_REQUEST["type"] == "csv") {
$locale_info["LOCALE_SGROUPING"] = "0";
$locale_info["LOCALE_SDECIMAL"] = ".";
$locale_info["LOCALE_SMONGROUPING"] = "0";
$locale_info["LOCALE_SMONDECIMALSEP"] = ".";
ExportToCSV($cipherer);
}
}
}
}
db_close($conn);
return;
}
// add button events if exist
$pageObject->addButtonHandlers();
if ($options) {
$xt->assign("rangeheader_block", true);
$xt->assign("range_block", true);
}
$xt->assign("exportlink_attrs", 'id="saveButton' . $pageObject->id . '"');
$pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/loadfirst.js\"></script>\r\n";
示例2: foreach
$data->table[$i][] = $student->username;
}
$data->table[$i][] = $student->lastname;
$data->table[$i][] = $student->firstname;
foreach ($sessions as $sess) {
if ($rec = $DB->get_record('attendance_log', array('sessionid' => $sess->id, 'studentid' => $student->id))) {
$data->table[$i][] = $statuses[$rec->statusid]->acronym;
} else {
$data->table[$i][] = '-';
}
}
$data->table[$i][] = get_percent($student->id, $course) . '%';
$i++;
}
if ($fromform->format === 'text') {
ExportToCSV($data, $filename);
} else {
ExportToTableEd($data, $filename, $fromform->format);
}
exit;
} else {
print_error('Students not found!', 'report.php?id=' . $id);
}
} else {
/// Print headers
$navlinks[] = array('name' => $attforblock->name, 'link' => "view.php?id={$id}", 'type' => 'activity');
$navlinks[] = array('name' => get_string('export', 'quiz'), 'link' => null, 'type' => 'activityinstance');
$navigation = build_navigation($navlinks);
print_header("{$course->shortname}: " . $attforblock->name . ' - ' . get_string('export', 'quiz'), $course->fullname, $navigation, "", "", true, " ", navmenu($course));
show_tabs($cm, $context, 'export');
$mform_export->display();
示例3: ExportToExcel
$locale_info["LOCALE_SGROUPING"] = "0";
$locale_info["LOCALE_SMONGROUPING"] = "0";
ExportToExcel();
} else {
if (@$_REQUEST["type"] == "word") {
ExportToWord();
} else {
if (@$_REQUEST["type"] == "xml") {
ExportToXML();
} else {
if (@$_REQUEST["type"] == "csv") {
$locale_info["LOCALE_SGROUPING"] = "0";
$locale_info["LOCALE_SDECIMAL"] = ".";
$locale_info["LOCALE_SMONGROUPING"] = "0";
$locale_info["LOCALE_SMONDECIMALSEP"] = ".";
ExportToCSV();
}
}
}
}
db_close($conn);
return;
}
// add button events if exist
$pageObject->addButtonHandlers();
if ($options) {
$xt->assign("rangeheader_block", true);
$xt->assign("range_block", true);
}
$xt->assign("exportlink_attrs", 'id="saveButton' . $pageObject->id . '"');
$pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/loadfirst.js\"></script>\r\n";
示例4: if
}
else if(@$_REQUEST["type"]=="word")
{
ExportToWord($rs, $nPageSize, $strTableName, $eventObj, $cipherer, $pageObject);
}
else if(@$_REQUEST["type"]=="xml")
{
ExportToXML($rs, $nPageSize, $strTableName, $eventObj, $cipherer, $pageObject);
}
else if(@$_REQUEST["type"]=="csv")
{
$locale_info["LOCALE_SGROUPING"]="0";
$locale_info["LOCALE_SDECIMAL"]=".";
$locale_info["LOCALE_SMONGROUPING"]="0";
$locale_info["LOCALE_SMONDECIMALSEP"]=".";
ExportToCSV($rs, $nPageSize, $strTableName, $eventObj, $cipherer, $pageObject);
}
db_close($conn);
return;
}
// add button events if exist
$pageObject->addButtonHandlers();
if($options)
{
$xt->assign("rangeheader_block",true);
$xt->assign("range_block",true);
}
$xt->assign("exportlink_attrs", 'id="saveButton'.$pageObject->id.'"');