时间:2021-07-01 10:21:17 帮助过:9人阅读
//验证是否已登录
include 'remember_password.php';
header("Accept-Ranges: bytes");
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=".$filename);
include("connect.php");
$sql="select * from specific_step";
$query = mysql_query($sql);
echo "序号\t业务名称\t操作步骤\t备注\t录入人\t录入日期";
while($row = mysql_fetch_array($query)){
echo "\n";
echo $row['serial_number']."\t".$row['name']."\t".$row['step']."\t".$row['other']."\t".$row['input_name'].
"\t".$row['input_date'];
}
?>
header("Accept-Ranges: bytes");
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=".@$filename);
$ar = array(
"abcd
123",
"再来一段
换行
再换行"
);
echo "序号\t备注\n";
foreach($ar as $k=>$v) {
echo "$k\t\"$v\"\n";
}