Ejemplo n.º 1
0
<?php

ob_start();
include_once "../../include/mysqldao.class.php";
require_once "../../control/tongji.include.php";
require_once "../../include/function.include.php";
$tongji = new Tongji();
$s_no = $tongji->getBYSNO();
ob_clean();
if ($_POST["submit"] == "导出Excel") {
    $file_name = iconv("UTF-8", "GB2312", '毕业生素拓课程表');
    Header("Content-type:charset=utf-8");
    Header("Content-type:application/octet-stream");
    Header("Accept-Ranges:bytes");
    Header("Content-type:application/vnd.ms-excel");
    Header("Content-Disposition:filename={$file_name}.xls");
    ?>
	 <html xmlns:o="urn:schemas-microsoft-com:office:office"
        xmlns:x="urn:schemas-microsoft-com:office:excel"
        xmlns="http://www.w3.org/TR/REC-html40">
	  <head>
	        <meta http-equiv=Content-Type content="text/html; charset=utf-8">    
			<!--<link type="text/css" rel="stylesheet" href="../css/table.css" media="screen" />-->
	  </head>
	  <table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" class="t1">
    <tr>
      <th colspan=5 align="center"><?php 
    echo $tongji->getYear();
    ?>
年毕业生素拓课程表<small>(导出时间:<?php 
    echo getNowDate();