下载xls的例子:<?
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=test.xls");
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
?>
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=test.xls");
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
?>
我的数据文件为
text.js
内容为mklist("歌曲路径","歌曲名字")
那我调用应为:
<?
header("Content-type:application/x-js");
header("Content-Disposition:filename=test.js");
echo "歌曲1路径\t";
echo "歌曲1\t\n";
echo "歌曲2路径\t";
echo "歌曲2\t\n";
.......
?>
吗?