Today, the installation cacti found that the PHP sockets extension is required, and now the LNMP is not installed, so I thought of the Phpzie tool installation extension, installation method is as follows:
Open Sockets extension in Linux
Windows Xdebug Configuration Installation
1. Download Xdebug
Download Address: http://xdebug.org/download.phpThe latest version is 2.1.2, with a lot of versions, 32-bit and 64-bit differences, differences between VC6 and VC9, and thread safety.
A.
$string = "This is a test";Echo str_replace (' is ', ' was ', $string);Echo ereg_replace ("() is", "1was", $string); 1 of which is the first bracket, the hollow lattice.Echo ereg_replace ("() is", "2was", $string); Where 2 is the second parenthesis
This method removes any HTML and PHP tag strings contained in the string, such as:
$str = " Text content ';
echo "1." $str. " ";
echo "2." Strip_tags ($STR);
The first output of the picture and text content in the table, the second output only
Instance The code is as follows:Copy code /*** File operations* * Example:* FileUtil: createDir ('a/1/2/3'); create a folder named a/1/2/3* FileUtil: createFile ('B/1/2/3'); create a 3 file under the B/1/2/folder in the test.* FileUtil:
The following is an example of using the autoload mechanism to load the Person class: The code is as follows:Copy code /* Autoload. php */Function _ autoload ($ classname ){Require_once ($ classname. "class. php ");} $ Person = new Person
Solution processFirst, the DNS problem is ruled out, because everything except these functions works normally. Although it is a URL with a domain name, the gethostbyname () function returns a correct result. Then I thought about the configuration of
When memcached extension is used in php to access memcached, when the memcached server fails to connect normally, the request response will be slowed down by default. Note: abnormal connection refers to a network failure. For example, if two servers
This is also written in the official document:#2 setcookie () delete example The code is as follows:Copy code // Set the expiration date to one hour agoSetcookie ("TestCookie", "", time ()-3600 );Setcookie ("TestCookie", "", time ()-3600 ,"/~
Example The code is as follows:Copy code $ A = "//si ";$ Keyword = preg_replace ($ a, '', $ _ POST ['searchword']); Other methods The code is as follows:Copy code $ Title = " ";$ Title = strip_tags ($ title );If (preg_match ('/ | | /', $
You can use a character as a wildcard to replace any character other than the linefeed (n. For example, a regular expression:.It can be matched with "cat", "sat", "# at", and "mat. It is mainly used when searching for files.You can also specify a
1. Class name(1) use the camel naming method (this is common in almost all languages)(2) Try to have less than 3 words(3) do not use uppercase letters for all acronyms. Eg: use GetHtmlStatic instead of GetHTMLStatic.2. Name functions and
Sometimes variable names bring great convenience to programming. That is to say, the variable name can be dynamically named and used. Generally, variables are named using the following statement: The code is as follows:Copy code $ A = 'hello ';?>
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