我有一个可用于将表单导出到 excel 文件的代码?现在一切正常,并将excel文件下载到下载文件夹中,但问题是i want to store excel file into the localhost Excelfiles folder?
导出到excel.php
<?php
header('Content-Type: application/force-download');
header('Content-disposition: attachment; filename=customers.xls');
// Fix for crappy IE bug in download.
header("Pragma: ");
header("Cache-Control: ");
echo $_REQUEST['datatodisplay'];
?>
测试.php
<form action="exporttoexcel.php" method="post"
onsubmit='$("#datatodisplay").val( $("<div>")
.append( $("#ReportTable").eq(0).clone() ).html() )'>
<table id="ReportTable" width="781" border="2">
<tr><td><input type="text" name="test" id="test"></td>
<td><input type="text" name="test2" id="test2"></td>
</table></form>