Method 1:
<? ('Content-Description: File Transfer '('content-Type: application/octet-stream' ('content-Disposition: attachment; filename = '. ('content-Transfer-Encoding: binary '(''Cache-Control: must-revalidate, post-check = 0, pre-check = 0 ('pragma: public '('content-Length :'. (?>
The above Code uses the php header function. You can refer to the following articles:
A simple example of the php header () function
Php header function implements the instance code for File Download
Example of using the header function in php
Php header usage
When downloading the php header function file, you are prompted to save the code.
Php header function to download text files
Php File header
Example of php sending download of various types of files using Headers
Understand the usage of the header function in php.
Method 2:
<? = ('Content-type: application/x -'. ['extension' ('content-Disposition: attachment; filename = '. ['basename' ('content-Length :'. (?>