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
The function of PHP page jump is to jump one page to another page in the website. For a friend who has just learned the language of PHP, it is the basic method that must be mastered.
Page jumps may be triggered by a user clicking on a link, a
This article is a filter in the PHP page of the BOM implementation code for detailed analysis of the introduction, the need for a friend to
copy the Code code below:
function Checkbom ($filename) {$contents = file_get_contents ($filename);$charset [
This article mainly introduced the PHP elimination and destroys the session the method, the example analysis Unset () and Session_destroy () eliminates and destroys the session the skill, needs the friend may refer to under
This article analyzes
When you send a message, you may be interested to know whether the message has been read by the other side, there is a good code to achieve this demand, like friends can refer to the next The code is as follows:
This article describes the JavaScript in the direct writing of PHP code method, the need for friends can refer to the
First, embed PHP code in javascriptJavaScript is included in the JS file, then the JS file can also write directly PHP code, but
This article mainly introduces the PHP calender (Calendar) code, the need for friends can refer to the The code is as follows: code is as follows: HTML; return $html; } /** * * detection is a 32-bit machine * @Author Fc_lamp * @blog:
If your site or blog has an inline Facebook page, you might want to know how many fans you have. This code will help you check the number of Facebook fans, remember, and don't forget to add the code to the second line of your page ID. The code is
This article mainly introduces the PHP implementation to separate the array by the specified number. Need friends can come to the reference, I hope to help you. The code is as follows:/** * * separates the array by the specified number * @param
This article mainly introduces the PHP recursive use example (PHP recursive function), including recursive get role ID string, recursive get Cascade role information array, through the parent role ID to get child role information, need friends can
How to send a PHP exported Excel as a message
Now realize the click to download Excel, and the function of sending text messages, how to combine, the PHP exported Excel as an attachment to send the perfect.
1. Generate Excel:
Header
Characters in a string in PHP can be found and modified by using a 0-based, square bracket in a similar array structure that contains the corresponding number.If you get a second $str[1] or $str{1}, {} is not recommended, preferably using [] test
declare is the process control structure of PHP, Directive currently supports two instructions, ticks use with the Register_tick_function function, see the following small example bar The declare structure is used to set the execution instruction
This article mainly introduced PHP read the file content how to empty the file, the need for friends can refer to theThe code is as follows: $FH = fopen ($path, "r+"); if (Flock ($FH, LOCK_EX)) {//write lock $old _content=json_decode (Fread ($fh,
This article mainly introduces the PHP file_exists function does not support Chinese name of the solution, very practical skills, the need for friends can refer to the
In general, PHP often uses file_exists () to determine whether a file or folder
This section mainly introduces how to open the method of the PHP Exif extension, mainly in the modification of the php.ini file
Server Configuration Description:
1. Found in the php.ini file; extension=php_exif.dll, remove the semicolon from the
This article mainly describes the PHP to get the folder path in the picture and pagination display examples, the need for friends can refer to the following Code as follows:
Two days ago to play a little cloud side of the light blog, think things relatively small, they also want to get something, directly put into the server installed, the result AH!!! $_session lost for several days ~
Situation Description:
$_session
Wrote a few identity card aspects of the function, personal feeling very useful, especially in the network survey, the personal information in the identification card is very useful, but should be a few, or in their own blog to forget.
PDO pre-processing statement avoids SQL injection attacks, and pdo pre-processing avoids SQL
The so-called SQL injection attack means that an attacker inserts an SQL command into the input field of a Web form or the query string requested by the
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