PHP generates excl, Word files
$time = time ();
$filename = Date ("Y years M D Day h points m minutes s seconds", $time). ' Questionnaire data ';
$rows = sp_looks_vote::d ownvote ();
$file = $filename. ". CSV ";
Header (' Content-description:file Transfer ');
Header (' Content-type:application/octet-stream ');
Header (' content-disposition:attachment; Filename= '. basename ($file));
Header (' content-transfer-encoding:binary ');
Header (' expires:0 ');
Header (' Cache-control:must-revalidate, post-check=0, pre-check=0 ');
Header (' Pragma:public ');
$tabletitle. = "Purchase address, often buy, like models, content how, impressions, whether to buy, how to feel, how to buy, how to buy, how to attract points, improve suggestions";
$conter = Iconv (' utf-8 ', ' GBK ', $tabletitle). " \ n ";
echo $conter;d ie;
By the way, the simple export Word document code to paste here:
<?php
Header ("Content-type:application/msword");
Header ("content-disposition:attachment; Filename=doc.doc ");
Header ("Pragma:no-cache");
Header ("expires:0");
$output = ' <table border= ' 1 "cellspacing=" 2 "cellpadding=" 2 "width=" 90% "align=" center ">";
$output. = ' <tr bgcolor= ' #cccccc "><td align=" center "> Pictures </td></tr> ';
$output. = ' <tr bgcolor= ' #f6f7fa "><td><span style=" color: #FF0000; " ><strong> below is a picture </strong></span& gt;</td></tr> ';
$output. = ' <tr><td align= ' center ' ></td></tr > ';
$output. = ' </table> ';
Echo $output;
?>
Warm tip: This article is for copying others. Designed for personal Learning
PHP generates excl, Word files