Gzencode uses the Zlib_encoding_gzip encoding by default, using the GZIP compression format, actually compressing the data using the Defalte algorithm, and then adding the file header and the Adler32 checksumgzdeflate By default Zlib_encoding_raw
After using the SMARTY,TP, also want to understand how its template technology is implemented, so write a simple template class, is basically read template file-> Replace template file content-> Save or static
tpl.class.php Main Analysis
Assign
Because some special character's display effect reason had to change the custom Utf-8 project to the GBK, because uses the AJAX technology, also involves the old problem--the coding transformation. Some form validation needs to return JSON data, PHP'
This example describes the PHP time class. Share to everyone for your reference, specific as follows:
year=date ("Y", $time);//Returns a two-digit year of}else{back $this->year=date ("Y", $time); Returns four-bit year 2013}//returns the
PHP references (in addition to the variables or functions, objects, etc. before the & symbol), in PHP refers to the meaning: different names to access the same variable content. There is a difference between the pointers in the C language. The
1,smarty Cache Configuration:
Copy Code code as follows:
$smarty->cache-dir= "directory name"; Create cache directory Name
$smarty->caching=true; Turn on cache, invalid cache for false
$smarty->cache_lifetime=60; Cache time, Unit
First, quick sort1. IntroductionFast sequencing is a sort algorithm developed by Donny Holl. In average, sort n items to be 0 (n log n) times compared. In the worst-case scenario, 0 (N2) comparisons are required, but this is not a common situation.
Then we in the program will inevitably design to the algorithm, that is, according to a certain probability to allow users to receive prizes. Let's look at two probability algorithm functions first.
Algorithm One
Copy Code code as follows:
This article analyzes the use of LTrim and RTrim in PHP to remove the left and right spaces and special characters. Share to everyone for your reference, specific as follows:
The definition of LTrim in PHP is as follows:
LTrim (String,charlist)
Working with scenes
First look at the following code:
Abstract class Base {
//do sth
}
class AClass extends base{public
static function create () {return
n EW AClass ();
}
Class Bclass extends base{public
static function create (
Function: Compress the file into zip, or rar compressed package. Suffix names can be customized.
How to: Instantiate first, then pass the argument. Two parameters. First an array of your file addresses. The second is the absolute address of the
Practice the truth, write a simple file PHP file include a JS file, the implementation of no error or warning information, and see the contents of the file containing JS is printed. It is therefore concluded that the include target file can be of
three solutions for Web uploaded files are shared:
Here I want to use the form method . By setting the enctype= "Multipart/form-data" attribute for the form element, allowing the form to submit data to be submitted in binary encoding, the content
The example in this article describes how PHP uses Phpexcel to import exported data. Share to everyone for your reference, specific as follows:
Import data:
';
$objReader = Phpexcel_iofactory::createreader ($inputFileType);
$objPHPExcel =
This example describes how PHP uses mkdir to create a multilevel catalog. Share to everyone for your reference, specific as follows:
PHP uses mkdir () to create a multilevel directory, which is very useful compared to your own first-level creation.
A lottery small program, introduction can be controlled, but also a prize in front of the display, and the program is simply impossible to obtain! By adding all the probabilities x10, the value of each item in the new array equals its first few and
First: Do not use mysql_escape_string, it has been deprecated, please use mysql_real_escape_string instead of it.
The difference between mysql_real_escape_string and addslashes is:Difference One:Addslashes does not know anything about the MySQL
Structure diagram of bridge pattern
second, the main role in the bridge modelAbstract (abstraction) Role: Defines an interface for an abstract class and holds a reference to the materialized object.Fixed abstract (refined abstraction) role:
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