PHP cookie operation details (set, use, and delete)
This article describes how to set, use, and delete cookies in PHP, as well as some restrictions on cookies. For more information, see.1,Set CookieSet the cookie in php and use the
Example of ThinkPHP (million-level) data sharding technology
Let's talk about the example of using the built-in table sharding algorithm of ThinkPHP to process millions of data. if you need it, let's take a look.Code extracted from thinkphp
Php download code
// Check whether all FORM fields are complete...
If ($ form_completed ){
Header ("Location: http://bbs.it-home.org/download/info_check.exe ");
Exit;
}
?>
Or the
The is_file () function used by php to determine whether a file is used
Var_dump(is_file('a_file.txt '). "\ n ";
Var_dump (is_file ('/usr/bin/'). "\ n ";
?>
Output: bool (true) bool
Php implements ftp upload class and call example
An ftp upload class, similar to an online example, is very simple and suitable for reference by new users.1. file Upload ftp. class. php
FtpUrl = $ ftpUrl;} if ($ ftpUser) {$ this->
Php provides download after reading the file and changing the file name
$ Filename = dirname (_ FILE _). '/oldfilename.exe ';
$ Out_filename = 'newfilename.exe ';
If ()){
Echo 'not Found '. $
Php code used to detect ajax requests
Most JavaScript frameworks, such as jquery and Mootools, send additional HTTP_X_REQUESTED_WITH header information when sending Ajax requests. the header is an ajax request, therefore, Ajax requests
How to select a suitable Web development framework for your project?
How to select a suitable web development framework for your project? First of all, for a software development start-up company, this is more like a business choice than
Summary of php method for calling external shell
System ("/usr/local/bin/webalizer ");
?>
Exec ()Prototype: string exec (string command [, string array [, int return_var])The exec () function is similar to
Php converts binary, octal, and hexadecimal formats.
/**
* Convert decimal to binary, octal, or hexadecimal with zero padding before the digits being insufficient *
*
* @ Param array $ datalist
Php user-defined function recursively replaces the content in the array
/**
Desc: recursively replaces array content
Link: bbs.it-home.org
Date: 2013/2/22
*/
Function arrContentReplact
How to create an array in php
Php does not need to specify its size when creating an array. Since php is a loose language, you do not even need to declare it before using arrays. Although there are no strict restrictions, php still
Solution when the array element obtained by fgetcsv is a null string
// The uploaded CSV file, which is usually GBK encoded in Excel,
// While the source code is UTF-8, transcoding is required
Php time zone setting method summary
Function_exists (date_default_timezone_set); // at this point, he always returns 1. this function is used to determine whether the character here is a defined function name.
How to convert data to scientific count when exporting data to excel
// In the excel. php file
$ ObjActSheet = $ objPHPExcel-> getActiveSheet ();
// Set the topic name
$ ObjActSheet-> setCellValue ("b1",
You do not need to re-compile php to add the ftp extension method.
Extension_dir = "/usr/local/php/etc/ext"
# Load module
Extension = ftp. so
# Save and exitNow, the ftp extension is
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service