Method description
First look at the methods that might be used. Open File wp-includes/link-template.php you will find WordPress 2.7 more than 4 comments page-specific methods:
Get_comments_pagenum_link
$pagenum: Page number
$max _page:
Small series on the internet to check a lot of PHP to generate a unique ID method of the article, found that there are many methods, special finishing this article with you to share PHP to generate a unique ID solution, I hope you like.
1, MD5
For the php://input introduction, the PHP official manual document has a very clear overview of it in a word. "Php://input allows to read raw POST data. It is a less memory intensive alternative to$http_raw_post_data and does no need any special php.
This function has always been used to obtain:
Copy Code code as follows:
function Microtime_float () {
List ($usec, $sec) = Explode ("", Microtime ());
Return ((float) $usec + (float) $sec);
}
See other people's source
How to use:
Memcached
Copy Code code as follows:
$cache = new Cache_memcache ();
$cache->addserver (' www1 ');
$cache->addserver (' www2 ', 11211,20); This server has double the memory, and gets double the weight
WordPress defaults to the theme developer's recommendation is to provide a page DOWN button at the bottom of the list of articles, so there is no function for paging navigation that is directly used under the list of articles. Here I provide a more
PHP Variable components:
Variable name: The PHP language variable name starts with $ + English/Underscore, can contain numbers, underscores, letters, case-sensitive. PHP also supports complex variables, such as $ $A, which increases the dynamic
Under the Apache Integration fastcgi mode operation of the PHP-FPM, it seems that little online materials, even the English version of the material is less. As long as it is php-fpm, basically with Nginx collocation. Check a large number of relevant
This example explains the PHP implementation of breadcrumbs, breadcrumbs navigation in the project is very practical, here to write a realization of this.
Path indicates that all ancestor Id,fullpath represent all ancestor IDs and their own IDs
PHP's comparison operator has = = = (equals) loose comparison, = = = = = = = = = = = = = = (equal) Strictly compare, there will be a lot of interesting problems.
When loosely compared, PHP will unify their type, such as character to number,
Verification code is usually used to secure our site registration or login is not injected, but in order to be more secure we usually generate some mixed authentication code, the next one to see examples.
In our development login module or the
Implementation principle:
This is to sort the ID pair for the ORDER by id DESC or the orders by ID ASC, and then to judge the article that is more identical than the current id> or less than the current article ID.
The SQL statement for the
1 Use the label to set the page encoding
The role of this label is to declare the client's browser with what character set code to display the page, XXX can be GB2312, GBK, UTF-8 (and MySQL is different, MySQL is UTF8) and so on. Therefore, most
Memcache is a danga.com project, the first to serve the LiveJournal, many people around the world use this cache project to build their own heavy load of the site to share the pressure of the database. It can handle any number of connections and use
In PHP development, cookie,session is stored on the server side of the session, relatively secure, and does not have storage-length limitations like cookies. The following is an introduction to the session.
Session and Cookies in PHP
In PHP
The requirements for the lottery algorithm are as follows: 1. Can control the probability of winning the lottery 2. With Randomness 3. It is best to control the number of prizes 4. According to the user ID or IP, mobile number, QQ number and
InterfacePHP class is a single inheritance, that is, do not support multiple inheritance, when a class requires multiple classes of functionality, inheritance is powerless, for this PHP introduced interface technology
If all the methods inside an
(1) All data should be hidden inside the class in which it is located.(2) The consumer of a class must rely on the common interface of the class, but the class cannot rely on its users.(3) Minimize the message in the class protocol.(4) Implement the
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