1. Why does PHP require asynchronous operations?
In general, PHP is applicable to web page display tasks that are time-consuming. If you want to perform time-consuming operations such as resize images, big data import, Batch Sending of EDM and SMS,
1. How to hide the header version information of nginx
Edit the nginx. conf configuration file and add the following line to http {}:
Copy codeThe Code is as follows: http {
......
Server_tokens off;
......
}
Edit the php-fpm configuration file,
I used to have a php interview question like this: Do not use the third variable to exchange the values of two variables. Generally, the third intermediate variable is used to realize the value exchange between the original two variables, but this
1, this
1. to use this, you must be in a situation like this. Otherwise, it will report an error: Fatal error: Using $ this when not in object context.2. this can call methods and attributes in this class, or call methods and attributes that can be
1. Time Conversion Function in php
Strtotime ("today ")
Date ("Y-m-d H: I", $ unixtime)
2. Obtain the timestamp of today's in php.
To obtain the unix timestamp at zero point, you can use $ todaytime = strtotime ("today "),
Then use date ("Y-m-d H: I"
First, explain separately,
Trim filters both ends of a string,Rtrim filters the tail of the string, = chop ()Ltrim filters the string header.
You can only use str_replace to filter the middle keys in a string.For example,
PHP code
Copy codeThe
On the Internet, I saw a very interesting function for converting the php RMB amount to the Chinese capital. The essence of this function is to convert the numbers to the Chinese capital. I tested it. It's very interesting. Just enter a number at
PHP functions rand and mt_rand
Mt_rand () is four times faster than rand ()
Many old libc random number generators have some uncertain and unknown features and are very slow. The rand () function of PHP uses the libc random number generator
Following the method of retrieving data from the PHP-EasyUI DataGrid in the previous article, this article continues to describe how to operate the DataGrid, store data in the database, implement the MVC Architecture, and separate and operate the
Remember, you can use it directly when you need to use it in the future, or you can click here to view this article.
Copy codeThe Code is as follows: // Method 1:
Function extend_1 ($ file_name)
{
$ Retval = "";
$ Pt = strrpos ($ file_name ,".")
Algorithm principle
If P is used to represent the full arrangement of n elements, and Pi is used to represent the full arrangement of n elements that do not contain element I, (I) pi indicates the arrangement of Pi with the prefix I. The full
The basic logic is the same as that of. net. It is to replace the object class with an array for configuration. The logic is simple, and the paging html is spliced according to the condition judgment.
It has the following simple functions:
1:
We have learned the basic syntax of regular expressions, including delimiters, atoms, metacharacters, and pattern modifiers. In fact, to work with a regular expression, you must use a regular expression to process the function. This section
PHP multi-Process: Use PHP Process Control Functions (PCNTL/thread Control function)
Function reference visible: http://www.php.net/manual/zh/ref.pcntl.php
It can only be used in Unix Like OS and Windows.
-Enable-pcntl must be added during php
The original code in the animation is as follows:
Copy codeThe Code is as follows: VERSION 1.0 CLASS
BEGIN
MultiUse =-1 'true'
Persistable = 0 'notpersistable
DataBindingBehavior = 0 'vbnone
Performancebehavior = 0 'vbnone
MTSTransactionMode = 0
A. Internal sorting (directly loaded to memory for sorting): including swap sorting (bubble and quick), selective sorting, and plug-in sorting
B. External sorting (because the data volume is large, external storage is needed for sorting): including
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