/*** Calendar** Copyright (c) 2007 by Chen Yixin (Deep Space). All rights reserved* to contacts the author write to
{@link
mailto:shenkong@php.net
} * @author Chen Yixin (Deep Space) */ if (function_exists (' Date_default_timezone_set ')
For you to introduce PHP learning in the regular use of the PHP predefined variables, through predefined variables can get user sessions, user operating system environment and the environment of the local operating system and other information.
There are several ways to traverse an array:
1, consecutive index of the array:
It is easy to traverse a contiguous array because the index of the array is contiguous (0 1 2 ...), so we can first compute the number of elements in the group with
The code is as follows
function Funcmtel ($STR)//mobile number Regular expression test
{
Return (Preg_match ("/(?: 13d{1}|15[03689]) d{8}$/", $str))? True:false;
}
Test
18678785887
Return to
False
Cause analysis, see the discovery that the
Because the FTP installation on the VPS always fails, you need a tool that can be used for file management through the Web. Ajaxplorer is a file management system running in PHP, the powerful function and the gorgeous interface is the first time to
1. isset function: Determine whether the variable is initialized
Description: It does not determine whether the variable is empty and can be used to determine whether the elements in the array have been defined
Note: When using isset to determine
This article gives an example of how PHP obtains system variables. Share to everyone for your reference. Specifically as follows:
Here are some PHP built-in functions to get a variety of system variables.
?
1 2 3 4 5 6 7 8 9
$v =
Open a command prompt cmd.exe
E:wampbinphpphp5.2.6>php.exe a.php 11
11 is the pass parameter
Get
if ($argv [1]) {
$_get[' id ']= $argv [1];
}
echo $id =$_get[id]+1;
You can change the a.php to your file name, note the directory structure
I
In fact, as long as the implementation of a simple Ajax detection user name, the normal point to be divided into three files. I have a simple point here:
The first one: index. PHP Untitled Document
Username *
Finding, filtering, and searching array elements are some of the common features of array operations. Here are a few related functions.
In_array () function
The In_array () function searches for a specific value in an array rollup and returns
The example in this article tells a PHP method for parsing an array of string permutations. Share to everyone for your reference. Specifically as follows:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21-22
"; Print_r
This article mainly introduces the PHP nested output buffer Code instance, this article explains the nesting uses the OB series function instance, needs the friend to be possible to refer to under
The output cache of PHP can be nested. You can
This article mainly introduces the Diffie–hellman-Herman Key Exchange (Diffie–hellman) algorithm principle and PHP implementation version, the need for friends can refer to the
Diffie–hellman-Herman (Diffie–hellman) is an algorithm that allows both
This article describes the PHP parsing XML method in detail in the form of an instance. Share to everyone for your reference. The specific analysis is as follows:
books.xml files are as follows:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Last night, a group of friends to collect Web pages found file_get_contents to get the page saved to the local garbled, the response header Content-encoding:gzipbut it's normal to look in the browser.because I have the relevant experience
Write your own php by string length to split the code, supporting Chinese characters, the following code and the use of methods, the need for small partners can refer to.
Here is the code I wrote to split the Chinese and English mixed characters:
?
This article mainly introduces PHP performance analysis tool xhprof installation tutorial, this article gives detailed installation steps and configuration methods as well as the use of examples, the need for friends can refer to the
Hprof is a PHP
The example in this article describes how the PHP implementation splits the value of the textarea to an array based on the carriage return line break. Share to everyone for your reference. The specific analysis is as follows:
TEXTAREA return
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