Home > Backend Development > PHP Tutorial > PHP forced download file code_PHP tutorial

PHP forced download file code_PHP tutorial

WBOY
Release: 2016-07-21 15:33:54
Original
810 people have browsed it

Copy code The code is as follows:

$filename = '1.png';
header( "Content-Type: application/force-download");
header('Content-Disposition: attachment; filename="'.$filename.'"');
echo $filename;
?> ;

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/322500.htmlTechArticleCopy the code as follows: ?php $filename = '1.png'; header("Content-Type: application /force-download"); header('Content-Disposition: attachment; filename="'.$filename.'"'); echo $...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template