Php id card number verification function. Copy the Code as follows: functionvalidation_filter_id_card ($ id_card) {if (strlen ($ id_card) 18) {returnidcard_checksum18 ($ id_card);} elseif (strlen ($ id_card) 15 )) {$ id _
The Code is as
Use the PHP string regular expression replacement function preg_replace. 1. preg_replace () $ msgpreg_replace (style. + styleis, $ msg); ----- delete stylestyle and the middle part $ msgpreg_replace ([^] +, $ msg); ----- is the delete and inner
1.
Phpdirname (_ FILE _) obtains the absolute path of the current FILE. For example, the current file is placed under (d: www), and the file name is test. php. The test code is as follows :? Phpecho _ FILE __; obtain the absolute address of the current
Example of phpsmarty second-level classification code and template loop. The structure of the data table of level 2 classification is as follows: the PHP code is as follows ** @ document category contains Level 2 classification @ paramint $ rootnum -
Php quickly queries the code of its parent key and parent key value based on the key name in the multi-dimensional array. I think so: traverse the multi-dimensional array and index all the keys to generate a one-dimensional array. each time the key
Using CURL spoofing in PHP to crawl pages or files. The copy code is as follows: initialize $ curlcurl_init (); the URL to be accessed: curl_setopt ($ curl, CURLOPT_URL, asen. me); set the current URL: curl_setopt ($ curl, CURLOPT_RE
The code is
PHP code execution time-consuming code fixes common online errors. Copy the code as follows: $ t1explode (, microtime ());... run the code... $ t2explode (, microtime (); echo ($ t2 [1]-$ t1 [1]). s. ($ t2 [0]-$ t1 [0]). ms; in fact, try it a little
Phpdebug installation skills. I plan to configure ZendDebugger for debugging. after the configuration is completed for a long time, the configuration is not successful and the ZendDebugger takes effect in phpinfo. I found it is a problem with php5.3
Use PHP to import Excel files to MySQL. I have studied it ~ Many methods ~ Finally, I decided to use Excel to import ~ I searched the internet for a lot of such information and found that the excel file was saved as a csv file, and then imported
Phpjoin function application. The copy code is as follows: $ keyarray (); $ valarray (); foreach ($ _ POSTas $ k $ v) {$ key [] '. strip_tags (mysql_real_escape_string (trim ($ k ))). '; $ val []. strip_tags (mysq
The code is as follows:
$ Key
Php displays the implementation code of arrays and objects. 1. use print_r ($ array $ var) print to print the meaning, while r is taken from the word of Array, so the function is to print the array content, it can print array content or
1. use print_
PHP learning output string (echo, print, printf, print_r and var_dump ). The following is a one-to-one introduction. 1. echoecho is a keyword of PHP, and it does not return a value. In terms of writing, it can omit parentheses. The following code:
Php implementation code for prime (Prime. Copy the code as follows :? Phpclasstmer {var $ time_start; var $ time_end; function _ construct () {$ this-time_start0; $ this-time_end0;} functiontimer () {$ this-_ constr
The code is as follows:
Text-based visitor check-in book. On the Internet, I saw someone using PHP + MYSQL as a visitor's check-in book. at that time, I thought it was very useful, so I also wanted to create one. However, I think it was a very occasional opportunity to use
Create a DIY three-step counter (on ). Most people are eager to use databases for counters, message books, forums, and other things. This article will introduce self-made counter programs. First, create 0 ~ 9 Most of these 10 GIF figures are eager
8 tips for PHP and MySQL development. Source: www. freelamp. comLAMP architecture website. I used to focus on installation and configuration, but I told a little about development because I am rarely engaged in development. The original text of this
Use PHP to read IMAP emails. This example can be used to practice IMAP functions, but if you really want to write WEBMAIL, you have to consider more than that ...... Lone Wolf login. php3? Phpif (! $ PHP_AUTH_USER) {Heade // This example can be used
A phpxml class for MySQL. I admit that I am not the leader in PHP. However, after reading some PHP information, I think some functions need to be added to it to process database connections and integrate XML. To do this, I admit that I am not 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