I'm exporting xls with this code:
<?php
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: inline; filename=filename.xls");
?>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
my export
</body>
</html>
but when I open it, I get:
the file format and extension of don't match. the file could be corrupted or unsafe. unless you trust its source, don't open it. do you want to open it anyway?
is there a way to avoid it?