C language standard library (1)-# include (ctype. h)C Standard Library-# include
By jxlijunhao in this header file contains a function for character testing, such as checking whether a character in a string is a number or a letter, and also
/**
* File Download
* Multiple file formats, including PDF, zip, gif, JPG, MPEG, Word, etc.
* Edit bbs.it-home.org
*/
function Dl_file ($file) {
First, see if the file exists
if (!is_file ($file)) {die ("404 File
PHP/** * Download File * Header function **/Dl_file ($_get[' filename ']);functionDl_file ($file){ $file= ".//images//".$file; //First , see if the file exists if(!Is_file($file )) { die("404 File not Found!" ); } //Gather relevent info about
This article introduces a PHP implementation of a file download function, you can support the download of a variety of format files. Refer to a friend who needs it.PHP file Download function share, the code is as follows:
404 File Not found!");
Please refer to the question of downloading MP4 files in PHP. the file download is incomplete.
function dl_file($file){ $len = filesize($file); $filename = basename($file); $file_extension = strtolower(substr(strrchr($filename,"."),1));
Character Processing functionsThis category function is used to process a single character, including the character category test and case-insensitive conversion of characters.
Header file ctype. h
Function list <>Function category function
Support for file download in any formatThe function has two parameters, the first parameter is the file completes the path in the server, the second parameter is the download display file name.
/**
* Download File
* filename
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.