Regular expressions
Role:
1, split
2, matching
3, find
4, replace
A regular expression consists of at least one atom
A regular expression is a string of characters
When to use regular.
1, form matching
2,url Rewrite, routing rewrite
3, thieves
Recently studied some of the crawler-related code, you can simply understand that the crawler is actually access to the page, and its information to a certain extent or processing, to achieve their intended goal of the program, after studying the
Configure error Xml2-config not found. Please check your LIBXML2 installationCentOS 6.5 Installs PHP 5.6 report configure error Xml2-config not found. Please check your LIBXML2 installation error
Check to see if the LIBXM package is
PDO (Phpdataobject) is PHP5 new things, PHP6 are coming out of the time, PHP6 only the default use of PDO to process the database, will all the database extension to the PECL, then the default is not our favorite php_ Mysql.dll and so on, then how
1. Open File function
fopen (): For opening a file, you need to specify open mode when opening
Open mode
If the file does not exist, it is not created automatically
R: Read-only mode opens and points the file pointer to the beginning of the file
PHP variables Scope in PHP, you can declare variables anywhere in the script. The scope of a variable refers to the part of the script that the variable can be referenced/used.
PHP has three different scope variables: local global (Global) static
The output is in the following statement: Echo iconv ("UTF-8", "GBK", $Song _url); Solve Chinese garbled problem
A The first is the coding of PHP pages
1. php file itself and the encoding of the Web page should match
A. If you want to use gb2312
regular expression matching rules for PHP core technology and best practices
This article introduces several common matching rules.
1. Character Group
Finding numbers, letters, and whitespace is simple because you already have the metacharacters
PHP implementation WebSocket Real-time message push
socketservice.php
add
ress = $address;
} if (!empty ($port)) {$this->port = $port;
The Public Function service () {//Gets the TCP protocol number.
$tcp =
1. Single Case mode
Singleton mode, as the name suggests, is only one instance. As an object's creation pattern, the singleton pattern ensures that a class has only one instance, and instantiates it and supplies the instance to the entire
As we all know, arrays can be done by using a Foreach loop, and we can also use an object as an array to do the loop operation.
1. Object Inheritance Iterator interface
_p = 0;
/** * Returns the current value * * @see iterator::current () * * *
Recently in the study of some POC, found that most of the POC will have such a ini_set (' Default_socket_timeout ', 5), meaning that the configuration Default_socket_timeout set the parameters of 5. Do not know what the meaning of this configuration,
Http://www.cnblogs.com/zqifa/p/php-6.html
For most cryptographic cryptography, we can use MD5, SHA1 and other methods. Can effectively prevent data disclosure, but these methods apply only to data encryption that does not need to be restored.
For
A problem that has wasted hours of my time is simple.A simple code
$dir = "temp";
mkdir ($dir, 0755);
Prompted me to permission denied.
I tried to change the parent folder permissions, recreate the folder, change the permissions, move the file,
In the development process, often appear the form error and return the page when the information is all lost, in order to support page bounce, you can use the following two ways to achieve.
1. Use header header to set cache control header
The include (or require) statement gets all the text/code/markup that exists in the specified file and copies it to the file that uses the include statement.
Include files are useful if you need to refer to the same PHP, HTML, or text on multiple
1. What security issues should be paid attention to when you first talk about PHP file uploads?
File type mime and suffix name judgments (may be maliciously modified by the user)
File must be renamed
File storage directory does not apply executable
Traversing an operation that is primarily used to traverse an element, as with every element in an array, we can use iterators
Interface demo//here describes the interfaces that are provided to developers{Public function fn1 ();Public function fn2 (
In the syntax of PHP, Echo and print are all ways to output a piece of content to a page.
However, there are some differences between the two, the specific aspects of the following:
(1) Echo supports comma syntax, and print does not support this
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