PHP provides the file download function. This is the html code. this is mainly used for PHP to download the content of this site. it puts the files to be downloaded and the PHP code page in the same directory, hoping to help more people, if you have any questions, this is the html code, which is mainly used to download the content of this site in PHP. put the file to be downloaded and the PHP code page in the same directory, I hope to help more people. if you have any questions, please contact QQ: 523132661 and wait for your visit at any time. Have a good job.
Download broadband troubleshooting manual
Below is the word. php page
If (! Isset (GET ["file"]) |! Isset (GET ["type"]) {
Print "no file selsect"; exit ();
}
$ File = GET ["file"]. ".". GET ["type"];
If (@ $ fp = fopen ($ file, 'r ')){
Header ("Content-type: octet/stream ");
If (strstr (SERVER ["HTTP_USER_AGENT"], "MSIE ")){
Header ("Content-Disposition: filename =" .mb_convert_encoding('broadband user fault diagnosis manual .doc ', 'gb2312', 'utf-8'); // For IE
} Else {
Header ("Content-Disposition: attachment; filename =" .mb_convert_encoding('broadband user fault diagnosis manual .doc ', 'gb2312', 'utf-8'); // For Other browsers
} While (! @ Feof ($ fp )){
Echo fread ($ fp, 1024 );
} Www.2cto.com
// @ Fpassthru ($ fp );
Exit ();
} Else {
Print "this file does not exist ";
}
From Spring column
Ghost is mainly used for PHP to download content from this site. it puts the files to be downloaded and the PHP code page in the same directory, hoping to help more people, if you have any questions...