大家好,我如何在文本文件的标题中显示时间,这是我的代码:
<?php
header('Content-disposition: attachment; filename=test.txt');
header('Content-type: text/plain');
...
?>
我希望文件的标题可以是这样的测试_ 2013年8月30日.txt我希望有人能帮助我
您可以使用date
函数,而我不会使用spaces
或,
。
header('Content-disposition: attachment; filename=test_' . date('F_j_Y') . '.txt');