There are two processing methods on the server side. One is to set it in a server such as apache or iis or tomcat, or to specify the sending type in the program.
This information belongs to http header information, and PHP has functions to directly operate on header information. Implementation method of
php:
Copy code The code is as follows:
header(" Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=".basename($_GET['url']));
readfile($filename);
?>
http://www.bkjia.com/PHPjc/320324.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/320324.htmlTechArticleTwo processing methods on the server side, one is to set it in a server such as apache or iis or tomcat, or in the program Specify the sending type. This information belongs to http header information, PHP has direct...