Fsockopen function can be used, first of all to open the php.ini in the Allow_url_open=on;
Fsockopen is the encapsulation of the socket client code, which encapsulates the socket_create,socket_connect.
Server-side code: server.php
Copy CodeThe code
Unix Install PHP module, need to recompile php,windows under the installation template, just the configuration in the php.ini to open the appropriate DLL, for example, need to join the GB library support, the following settings are
Instructions for use
First look at the description of the Levenshtein () function on the manual:
The Levenshtein () function returns the Levenshtein distance between two strings.
Levenshtein distance, also known as the editing distance, refers to
These days to see a few articles about the tail recursion, before the end of the recursive not much concept, so back to study the tail recursion.
Concept of tail recursionThe concept of tail recursion (Tail recursion) is a subset of the concept
1. Introduction and difference between cookies and session
In a very long time, we need to track the activities of the visitors throughout the site, automatic or semi-automated identification of their identity (that is, often said site landing and
Definition and usageThe Stripos () function returns the position of the first occurrence of a string in another string.
If the string is not found, false is returned.
GrammarStripos (String,find,start)
Parameters
Description
This article mainly describes the serialization and deserialization of XML and objects. And a few simple serialization and deserialization methods are attached for everyone to use.
Let's say we have two of these classes in a Web project
Copy
Copy CodeThe code is as follows:
/**
* Generic tree class, which can generate any tree-type structure
*/
Class Tree
{
/**
* 2-dimensional array required to generate the tree structure
* @var Array
*/
var $arr = array ();
/**
* Create a tree
The YII Framework provides 2 sets of access systems, one is a simple filter (filter) mode, the other is a complex and comprehensive RBAC mode, and I'm going to talk about the first set here (because I've just learned this). If you have studied the
2010 should be remembered, because SQL will die this year. This year the relational database is dying, and this year developers find that they don't need a long hard time constructing columns or tables to hold data.
2010 will be the starting year
First let's look at a problem: the output of the following code,
Copy CodeThe code is as follows:
Var_dump (Memory_get_usage ());
$a = "laruence";
Var_dump (Memory_get_usage ());
unset ($a);
Var_dump (Memory_get_usage ());
The output (on my PC, may
Proxy mode, which is an enhancement to a simple handler (or pointer) that refers to an object: this pointer is replaced by a proxy object, which is located between the client and the real executor, and the pointer has a hook that can be exploited by
Two kinds of process management modes of PHP-FPMThe number of PHP-FPM processes can also be divided according to the settings
Dynamic and StaticOf
One is to directly open the specified number of PHP-FPM processes, no longer increase or decrease;
The
The responsibility chain model, whose purpose is to organize an object chain to process a request such as a method call.
When Concretehandler (a specific handler) does not know how to satisfy a request from the client, or if it is not intended for
PS aux |grep php-fpm |moreSee Total PHP-FPM
php-fpm.conf Configuration
PID string
The location of the PID file. The default is empty.
Error_log string
The location of the error log. Default: Installation path
Sometimes variable names can be a great convenience for programming. This means that variable names can be dynamically named and used. The usual variables are named by the following statements:
$a = ' hello ';A mutable variable name refers to the
1. Try to be static:If a method can be static, it is declared static, the speed can be increased by 1/4, even when I test, this improved by nearly three times times.
Of course, this test method needs to be executed at level 100,000 and above, the
Describes how to install the lamp environment using Yum under CentOs6.2, some brothers also like to use the installation method of compiling, personally feel that if not to the server to do custom, with yum install stable simple, why go to
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