0

我正在尝试在我的 Tidesdk 应用程序中生成强制下载 excel 文件。所以我正在尝试以下代码工作,但它不能正常工作。所以请大家帮我找出解决方案。

<?php
    header ("Content-type: application/octet-stream");
    header( "Content-disposition: attachment; filename=sheet.xls" );
    echo 'First Name' . "\t" . 'Last Name' . "\t" . 'Phone' . "\n";
    echo 'Maddy' . "\t" . 'Shan' . "\t" . '555-4445' . "\n";
?>
4

1 回答 1

0

只需删除

    <?php 

    ?>

你应该好好去!

于 2013-05-30T16:22:07.903 回答