想將一個列數組匯出到execl然後瀏覽器下載,找了很多例子跟著做也不行,數組跟本就傳遞不過去。用例子照貼也不行。
<?php if(!defined('IN_MEMBER')) exit('Request Error!'); ?>
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< ;html xmlns="http://www.w3.org/1999/xhtml">
#<head>
<meta http-equiv="Content-Type" content ="text/html; charset=utf-8" />
<title><?php echo $cfg_webname; ?> - 會員中心- 我的流向</title>
<link href="<?php echo $cfg_webpath; ?>/templates/default/style/member.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo $cfg_webpath; ?>/templates/default/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo $cfg_webpath; ?>/templates/default/js/member.js"></script>
#</head>
#<body>
<div class="header">
<?php require_once(dirname(__FILE__).'/header.php'); ?>
</div>
<div class="mainbody">
# <h1 style="text-align: center">八方流向查詢系統</h1><br>
<h5 style="text-align: center">(系統已依照您的權限列出資料)</h5>< br>
<?php
error_reporting( E_ALL&~E_NOTICE );
$dosql->Query("SELECT ypname FROM `#@__unameym` WHERE uname= '$c_uname' ORDER BY id DESC");
if($dosql->GetTotalRow() > 0)
## ?> <?php while($row2 = $dosql->GetArray()) { # ?> <?php $row3 = $row2['ypname'];## $row5[]= $row3;
# }
?>
<ul class="list">
<table width="880" border="1" bgcolor=#DCDCDC>
<tr>
<th width="12%"&oo "7%">規格</th>
<th width="13%">廠商</th ;
## & %lt % wlt;% wplt; >單位</th> ; ;/th> <th width="8%">日期</th> >lt </th>6% 選擇 >lt <) w>6% 單據 >lt < <th width="9%">入庫數</th> <th width="9%;thlt width="9%"< </tr> </table># $p = count($row5); for($j = 0 ; $j <= $p ; $j ){ $dosql->Execute("select * from `#@__liuxiang`WHERE ypname = '$row5[$j]'ORDER BY id DESC"); if($dosql->GetTotalRow () > 0)#while($row7 = $dosql->GetArray()){
$r1 = $row7['ypname'];
##$r11[]= $r1;
##$r2 = $row7['guige'] ;
$r22[]= $r2 ;
##$r3 = $row7['盛燦'] ;
$r4 = $row7['danwei'] ;
#$r5 = $ row7 ['pihao'] ;
$r6 = $row7['bz'] ;
## $r66[]= $r6;
##$r7 = $row7['rq'] ;
$r77[]= $r7 ;
}
## }
$_SESSION["temp"]=array('$r11');
#? >
# $l = count($r11) ;
##############################################################################################################' ###