One, the judgment is all Chinese
Copy Code code as follows:
$str = "' 324 is";
if (!eregi ("[^\x80-\xff]", "$str")) {
echo "All Chinese";
}else{
echo "No";
}
Second, the judgment contains Chinese
Copy Code code as follows:
The difference between a session and a cookie is that the file of the cookie is stored on the client, and the session is saved in the server, in order to improve security, the session has advantages.
Because the session on the server side of the
Array_unshift () Definition and usageThe Array_unshift () function inserts one or more elements at the beginning of the array.
Added elements as a whole, and the order of these elements in the array is the same as in the parameters.
The function
Rsort () Definition and usageThe elements of an array of rsort () functions are sorted in reverse order by key values. The functionality of the Arsort () is essentially the same.
Note: This function assigns a new key name to the cell in the array.
This example describes how PHP obtains header information that is sent to the user. Share to everyone for your reference. The specific analysis is as follows:
The Headers_list function has no arguments and returns an array. The returned array
The example of this article describes the implementation of the PHP single example mode. Share to everyone for your reference. Specifically as follows:
*
* *
* * Class single (* * * "class One" () (*)
$name;
private static $single;
This article illustrates the method of PHP using reflection to implement plug-in mechanism. Share to everyone for your reference. The implementation methods are as follows:
Copy Code code as follows:
/**
* @name PHP Reflection
Array_intersect () Definition and usage
The Array_intersect () function returns an array of intersections of two or more arrays.
The resulting array contains all the values that are in the array of comparisons and all other parameter arrays,
This article illustrates the PHP implementation method of Memcache consistent hash. Share to everyone for your reference. Specifically as follows:
Recently looking at some of the distributed aspects of the article, so the use of PHP to achieve
The example in this article describes how PHP merges associative and unassociated arrays through the Array_merge () function. Share to everyone for your reference. The specific analysis is as follows:
Array_merge () is a PHP function that merges an
The example in this article describes how PHP uses Asort () to sort associative arrays by value. Share to everyone for your reference. The specific analysis is as follows:
PHP uses Asort () to sort the associative array by value, and the difference
This article analyzes the Ob_flush function and flush function usage in PHP. Share to everyone for your reference. Specifically as follows:
Ob_flush () Function: Remove the data from the PHP buffering and put it in the server buffering
Flush ()
This article gives an example of how PHP short URLs and numbers are converted to each other. Share to everyone for your reference. The implementation methods are as follows:
) {
$key = $number%;
$number = Floor ($number/54)-1;
$out
This example describes the way PHP uses FFmpeg to add subtitles to video. Share to everyone for your reference. The implementation methods are as follows:
Copy Code code as follows:
$dir = './'; Set to current folder
if ($handle =
The example in this article describes the way PHP opens multiple processes. Share to everyone for your reference. The implementation methods are as follows:
Copy Code code as follows:
$IP = ' 192.168.1.1 ';//windows IP of the computer
$
CentOS release 5.11 (final), CentOS release 6.6 (final) x64 test passed.
GCC version, glibc version, libstdc++. So.6 version, gnu-binutils version, the tar version, Python version, re2c version of the right to do, and finally have to vomit blood,
This article illustrates the single example mode of PHP design pattern. Share to everyone for your reference. The specific analysis is as follows:
Single case mode (responsibility mode):
Simply put, an object (before learning design patterns
This article illustrates the method of implementing the message of micro-letter template by PHP. Share to everyone for your reference. Specifically as follows:
This method is based on thinkphp implementation, the specific OrderPush.class.php files
Copy Code code as follows:
$str = ' People's Republic of China 123456789ABCDEFG ';
Echo Preg_match ("/^[u4e00-u9fa5_a-za-z0-9]{3,15}$", $strName);
Run the code above to see what prompts?
Warning:preg_match (): compilation
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