Mobile (China Mobile phone number):
The code is as follows
Copy Code
regexp= "^ ((d{3}) | ( d{3}-))? 13[456789]d{8}|15[89]d{8} "
Verify if the phone number is a regular
The code is as follows
t.php Code
The code is as follows
Copy Code
?$title = isset ($_get[' title ')] $_get[' title ': ';if ($title){$sql = ' Select id from filecontent where title= '. $title. ';$q = MySQL Tutorial _query ($sql) or Die
Brief introduction
PHP is a server-side scripting language that is easy to learn and use. With minimal programming knowledge you can use PHP to create a truly interactive web site. This tutorial does not want you to fully understand the language,
To run the installer for the PHP package, click the "Next" button in the pop-up Welcome window, click the "I Agree" button in the License Agreement window, and then select "Standard (Standard)" Installation in the Installation Type window, and click
If the upload directory is embedded in a PHP file, it can be executed remotely. For security reasons, we generally prohibit the running of PHP scripts on the upload directory.
Below Apache we can use the method to prevent running PHP script:
The main task of the view layer of the MVC pattern is to work with the display of the page and the results. In the implementation of PHP, mainly reflected as a template (using templates, you can achieve the PHP code and HTML code separation purposes,
Method 1 with Curl:
first, the steps to open PHP Curl function library
1). remove Windows/php.ini file; Extension=php_curl.dll Front; /* Use echo phpinfo () to view the path of the php.ini * *
2). Copy the Php5/libeay32.dll,ssleay32.dll to the
Collector, usually called the Thief program, is mainly used to crawl other people's web content. On the production of the collector, it is not difficult to open the Web page to be collected remotely, and then use regular expressions will need to
At a time when all kinds of hackers are rampant, how to achieve their own PHP code security, to ensure that the program and the security of the server is a very important issue, I casually read the information about PHP security, not many, at least
1. Collation of Strings: Chop (), Itrim (), Trim ()
The trim () function is used to organize user input data, as shown below:
$name =trim ($name);
$email =trim ($email);
The Tirm () function can remove spaces from the start and end of a string
The PHP language from the birth, has the very good process-oriented programming characteristic. Only in its evolutionary process has gradually strengthened the object-oriented characteristics, until the PHP5.0, it is close to perfection. In general,
Fgets(PHP 4 and PHP 5)Fgets-get the pointer to the line slave fileDescriptionString fgets (resource $ processing [Summary $ length])Get the line from file pointer.ParametersHandleThe file pointer must be valid and must point to a file that
The code is as follows:Copy code If ($ submit = "submit "){If (file_exists ($ old_name )){If (rename ($ old_name, $ new_name) // rename the original file{Echo "modified successfully! ";}} Else {print $ old_name. "The file does not exist! ";}} ?>
Scenario/problem description:The Ajax submission page is encoded as gb2312, and the database is encoded as utf8. Data is inserted without modifying the page and database encoding.Custom functions: The code is as follows:Copy code Function
OperationsWhat is JSON?JSON is a data exchange format used to transmit excessive data in an interconnected network. Although XML exchange is dominant in the Internet, JSON is simpler and suitable for lightweight data.Although JSON was originally
(1) echo, print, printf, sprintfThe first two functions are output strings. If there is a variable name in the string, it is replaced with its value.The last two functions are similar to C functions with the same name.(2) strchr, strlen, strtok,
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