This site has previously shared a file download function, the specific article connection address is as follows:
PHP File Download function (code)
Recently a customer reflects their site all the pictures can not download, downloaded pictures are
Let's look at some basic concepts first.
One, PHP script and dynamic page.
PHP script is a server-side scripting, can be embedded and other methods and HTML files mixed, but also class, function encapsulation, such as the form of templates to the
function | data | database
Discuz 5.0 do not use their own IP data, but the use of pure IP data format, access to the pure IP database a little trouble, its storage format is more special and interesting, the specific format of the analysis of the
This article mainly introduced the PHP implementation to support SSL connection SMTP mail send class, the example analyzes the PHP implementation SMTP mail sends the class the principle and the technique, as well as the support SSL connection method,
Cache
Ccdot/2006-2-26 3:50:32/324/
/*Author: Old farmerLast modify:2006-2-26Author url:http://www.cjjer.comDes cription: This article about caching, out of the blue ideal his station declined to reprint, otherwise QXDD., passed under the
One, PHP script and dynamic page.
PHP script is a server-side scripting, can be embedded and other methods and HTML files mixed, but also class, function encapsulation, such as the form of templates to the user request processing. In any way, the
1.5 minutes to send email, and the message content is generated by the HTML Template table while (1) { //ten minute var_dump ("Check task, please don ' t close"); //send Email Processdbdata ($DB); //process Inventory State
To introduce the function first, we will use three functions, Fopen,fread,fwrite. The order of binary reads and writes is to open the read-write file in binary mode with fopen, and then use the fread and fwrite two functions to write the data to the
Shared memory is an efficient way to exchange data between applications in the same machine. A process can create a segment of memory that can be accessed by another process as long as it has the correct permissions assigned to it. Each memory
In front, we introduce a way of communication between processes: Using a signal, we create a notification event and generate a response through it, but the information passed is only a signal value. Here is an introduction to another way of
The general counter program uses the Execute external program function exec (), but many host spaces (including charges) reject this dangerous operation.We have to use Fread (), fwrite () and other files to read and write functions, the key is to
Tutorials | Application example PHP implementation file security download
The procedure is as follows:
$file_name = "Info_check.exe";
$file_dir = "/public/www/download/";
if (!file_exists ($file_dir. $file_name)) {//check whether the file exists
This article describes the PHP implementation of the WAV file into the image file and display in the page method. Share to everyone for your reference. The specific analysis is as follows:
Requirements: Convert WAV files to PNG files and display
Safety
1. Remote Files PHP is a rich language, it provides a large number of functions, so that programmers can easily implement a variety of functions, remote files is a good example:Code$fp = @Fopen ($url, "R") or Die ("Cannot open $url");while
This article mainly introduces the PHP read the pure IP database display details of the use of examples, we refer to the use of the bar Code as follows:
Open file: Fopen:fopen (Filename,mode);//fopen ("Test.txt", "R"); Open mode: R read-only open, point file pointer to file header r+ read-write mode open, point file pointer to file header W Write, point to file header, If it does not exist, try to
First, design a search form
Build a search.htm in the root directory of the site, as follows
Search Forms
Second, the search program
Then build a search.php file in the root directory to handle the data from the Search.htm table conveys. The
PHP implementation file Security download
The procedure is as follows:
The following are the referenced contents: $file_name = "Info_check.exe"; $file_dir = "/public/www/download/"; if (!file_exists ($file_dir. $file_name)) {//check
Simple example:
split.php$i = 0; Divided block number$fp = fopen ("abc.wmv", "RB"); The file to split$file = fopen ("Split_hash.txt", "a"); A text file that records the split informationwhile (!feof ($FP)){$handle = fopen ("abc.wmv.{ $i}
3. Random reading and writing of files
Sometimes the user wants to read the information directly in the middle of the file, it is obviously inconvenient to read and write in the file in order to start from the file header until the required file
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.