Heim >Backend-Entwicklung >PHP-Tutorial >php echo字符串直接下载
<code><span>$text</span><span>=</span><span>"字符串直接下载"</span>; <span>$fileName</span><span>=</span><span>"xxx.txt"</span>; <span>header</span>(<span>"Content-Type: application/txt"</span>); <span>header</span>(<span>"Content-Disposition: attachment; filename="</span><span>.</span><span>$fileName</span>); echo <span>$text</span>; </code>').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });
以上就介绍了 php echo字符串直接下载,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。