<? include('../include.php');//包含信息?>
<? include('excel/reader.php');//包含信息?>
<? include('../inc/retb.php') ?>
<? //include('../upload/upzy/thispath.php') ?>
<?
print str_repeat(" ", 4096);//
$exceltb=0;   //EXCEL工作表号
$savepath="../PLU_GG/";
$mfile=filelist($savepath);




echo "正在执行，请耐心等待……";
echo "<br>";




// ExcelFile($filename, $encoding);


/***
* if you want you can change 'iconv' to mb_convert_encoding:
* $data->setUTFEncoder('mb');
*
**/

/***
* By default rows & cols indeces start with 1
* For change initial index use:
* $data->setRowColOffset(0);
*
**/



/***
*  Some function for formatting output.
* $data->setDefaultFormat('%.2f');
* setDefaultFormat - set format for columns with unknown formatting
*
* $data->setColumnFormat(4, '%.3f');
* setColumnFormat - set format for column (apply only to number fields)
*
**/

//$excelfile="361808/".$_FILES['upload_file']['name'];

for($ii=0;$ii<count($mfile);$ii++) //遍历目录下所有.XLS文件
{
 
	

$excelfile="361808/".$upload_file_name;
$excelfile= $mfile[$ii];
echo $excelfile;
echo "<br>";


$data = new Spreadsheet_Excel_Reader();
// Set output Encoding.
$data->setOutputEncoding('GBK');
$data->read($excelfile);
error_reporting(E_ALL ^ E_NOTICE);




$totalj=0;
for ($i = 2; $i <= $data->sheets[$exceltb]['numRows']; $i++) {
        for ($j = 1; $j <= $data->sheets[$exceltb]['numCols']; $j++) {
               // echo "\"".$data->sheets[$exceltb]['cells'][$i][$j]."\",";
        $thiscols[$j]=$data->sheets[$exceltb]['cells'][$i][$j];
        }
$xh=$thiscols[1];
$xjh=$thiscols[2];
$xm=$thiscols[3];
echo $xh."____".$xjh."_____".$xm."<br>";
ob_flush();
    flush();
    //sleep(1);
      usleep(200000);

$totalj++;
}

echo "<br><br><hr>";



}



?>


<link href="css/base.css" rel="stylesheet" type="text/css">
<link href="css/main.css" rel="stylesheet" type="text/css">
<br>
<br>
<br>
<br>
<center>
<img src=../img/18.gif>
<!--脚本开始-->
<script language=javascript>
function countDown(secs,surl){
 //alert(surl);
 tiao.innerText=secs;
 if(--secs>0){
     setTimeout("countDown("+secs+",'"+surl+"')",1000);
     }
 else{

     location.href=surl;
     }
 }
</script>

<style type="text/css">
        .content{width:200px;height:100px; overflow: auto}
        </style>

<!--脚本结束-->
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
        <script type="text/javascript" charset="utf-8">
        $(function(){
            $('#add').click(function(){
                $("#content").append("<p>Hello</p>");
                //原生代码实现滚动条自动到最底部
                lct = document.getElementById('content');
                lct.scrollTop=Math.max(0,lct.scrollHeight-lct.offsetHeight);
            })
        })
        </script>

<script>alert('操作执行成功')</script>