Forum Moderators: coopster
<a href="http://yourservername/crosstab.php/crosstab.xls">
By linking this way the PHP will get processed properly and the phantom crosstab.xls will say to Internet Explorer that Excel type information is coming. I can recieve the file as a download just fine. but when i try to just view the file in a browser with out the d/l file the total returns as total score sum=1a2b so on.placeing the code above should fix this i think ,How and where does this code go on the page? Thanks in advance!.
?>
header("Content-Type: application/vnd.ms-excel");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
<?
be that way:
[b]<?[/b]
header("Content-Type: application/vnd.ms-excel");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
[b]?>[/b]
?
--hakre
what i would do is to place a that kind of spreadsheet file directly on the server and request it without php inbetween, then analyzing that request incl. the headers. use php later on to simulate the complete same behavior, maybe ajoute mod_rewrite to completely fake the request (which should not be necessary with your example URL).
--hakre