cari

Rumah  >  Soal Jawab  >  teks badan

Tolong beritahu saya tentang phpexecl! !

Saya ingin mengeksport tatasusunan lajur ke execl dan kemudian memuat turunnya dalam penyemak imbas Saya telah menemui banyak contoh dan mengikutinya, tetapi tatasusunan itu tidak boleh diluluskan. Menyiarkan contoh juga tidak berfungsi.


<?php if(!defined('IN_MEMBER')) exit('Request Error!');>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Transitional 1.0 //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;> - Pusat Ahli - Aliran saya</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. ></script>

<script type="text/javascript" src="<?php echo $cfg_webpath; ?>/templates/default/js/member.js">< ;. '); ?>

</div>

<div class="mainbody">

<h1 style="text-align: center">Sistem Pertanyaan Arah Aliran Bafang</h1><br> h5 style="text-align: center">(Sistem telah menyenaraikan data mengikut kebenaran anda)</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)

?

& gt; row2['ypname'];

$row5[]= $row3;

}

;&

<ul class="list"> ;

                                                                                                                                                                                                                                    ...                                                                                                                                                                                                                                                        <lebar ke = "8%" & gt; gt; sahaja & lt;/th & gt;

& lt; lebar ke = "9%" & gt;

                                                                                                                                                                                                                                                                                     

<?php

$p = kiraan($baris5) ;

untuk($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-et)

$r1 = $row7['ypname'];

$r11[]= $r1;


$r2 = $row7['guige'] ;

$r22[]= $r2;


['sheng'7]['sheng'7]['sheng'7] ;

$r33[]= $r3;


$r4 = $row7['danwei'] ;

$r44[]= $r4;


=$r5 ha '] ;

$r55[]= $r5;

$r6 = $row7['bz'] ;

$r66[]= $r6;

7 'rq'] ;

$r77[]= $r7;

$r8 = $row7['djlx'] ;

$r88[]= $r8;


row7['rk'] ;

$r99[]= $r9;


$rw = $row7['ch'] ;

$rww[]= $rw;



}


     }

 $_SESSION["temp"]=array('$r11');

?>

;

$l = kira($r11);

untuk($i = 0 ; $i <= $l ; $i++){

?>

        < sempadan 8 ="1">

 

 

      <tr>

           <td width="12%"><?g[$t;<<?php echo $r11

           <td width="7%"><?php echo $r22[$i]?></td>

           <td width="13%"&?gt echo $r33[$i]?<</td>

           <td width="6%"><?php echo $r44[$i]?></td>

       ; td width="6%"><?php echo $r55[$i]?></td>

               <td width="24%"><?php echo $r66[$ i]?></td>

               <td width="8%"><?php echo $r77[$i]?></td>

     width      td width=" 6%"><?php echo $r88[$i]?></td>

               <td width="9%"><?php echo $r99[$ i]?> ;</td>

             <td width="9%"><?php echo $rww[$i]?></td>

jadual>

<?php

}

?>

< nofollow" >导出excel表/格;


<?php

session_start();

              $arr = array(1,2,3,4,5,6) ; , objek atau tatasusunan boleh disimpan dalam sesi seperti ini

?>




?>


<?php




                                                                             


                                                                                                                                                                                                                                                                               

<?php


? php

?>

                         

<?php

?> ;

;li id="act-pnt" align="right" >< ;h2><a href="javascript:;" onclick="window. print();">Cetak halaman ini</a></h2></li>

</ul>

. div class="footer"> ;<?php echo $cfg_copyright;><</div>

$ arr = unserialize($_SESSION['sessarr']);// Deserialization

echo $_SESSION['sessarr'];

echo "<br>";

print_r($arr);>

?

Sila tulis kod secara terperinci. .

奥立奥奥立奥2361 hari yang lalu1337

membalas semua(3)saya akan balas

  • Summer

    Summer2018-07-10 14:32:00

    Anda boleh menyemak panduan ini untuk Excel https://blog.csdn.net/toume/article/details/80937438

    balas
    0
  • 无忌哥哥

    无忌哥哥2018-07-10 11:02:19

    Apakah laporan ralat anda Lihat laporan ralat untuk menyelesaikan masalah.

    balas
    0
  • 奥立奥

    Masalah ini telah diselesaikan dengan catatan~ Tetapi ada masalah baru~ Apabila saya klik untuk membuka halaman pemprosesan, tiada ralat atau gesaan muat turun~ Ia kosong.

    奥立奥 · 2018-07-10 16:59:52
  • Batalbalas