projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2ba7cad
)
GnumericToExcel.php
author
Alan Knowles
<alan@akbkhome.com>
Mon, 13 Dec 2010 07:37:59 +0000
(15:37 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Mon, 13 Dec 2010 07:37:59 +0000
(15:37 +0800)
GnumericToExcel.php
patch
|
blob
|
history
diff --git
a/GnumericToExcel.php
b/GnumericToExcel.php
index
38d9640
..
f53c8bc
100644
(file)
--- a/
GnumericToExcel.php
+++ b/
GnumericToExcel.php
@@
-90,10
+90,11
@@
class Pman_Core_GnumericToExcel extends Pman
}
// unlink($srcTmp);
$fname .= preg_match('/\.xls/i', $fname) ? '' : '.xls'; // make sure it ends in xls..
}
// unlink($srcTmp);
$fname .= preg_match('/\.xls/i', $fname) ? '' : '.xls'; // make sure it ends in xls..
- $fh = fopen($targetTmp, 'r');
+
header('Content-type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="' .addslashes($fname). '"');
header('Content-length: '. filesize($targetTmp));
header('Content-type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="' .addslashes($fname). '"');
header('Content-length: '. filesize($targetTmp));
+ $fh = fopen($targetTmp, 'r');
// will not work on IE... - needs while/fget..
fpassthru($fh);
unlink($targetTmp);
// will not work on IE... - needs while/fget..
fpassthru($fh);
unlink($targetTmp);