In the past, I tried to verify my ID card. we often used regular expressions to determine if the user entered a full number of 15 or 18 digits and then determined whether the ID card was valid. this method is only the most basic method, the ID card
Two-dimensional array sorting also provides a function array_multisort in php to directly sort the data, next I will introduce not only how to sort arrays by array_multisort, but also some custom two-dimensional array sorting methods. sometimes, to
POP3 class implemented in PHP can be directly used. When viewing POP3/SMTP protocols, I want to write an operation class by myself. The core is to use fsockopen and then write/receive data, which only implements the core functions, as a trainer who
We often need to use Curl multithreading to deal with some things. This article introduces Curl multithreading instances and their principles to introduce Curl multithreading instances and principles. For more information, see
I believe that many
This program uses the Firefox browser of 3.x to read local files and uploads large files through xmlHttPRequest. This program uses the Firefox browser of 3.x to read local files, implement the function of uploading large files through xmlHttPRequest,
Only part of the URL should be encoded. Otherwise, the colon and backslash in the URL will be escaped. There are two good examples below, if you have a similar situation, you can use urlencode () or rawurlencode () to encode the URL in PHP. The
The addition, subtraction, multiplication, division, and Division Calculator must have been used. This article describes how to use php. The following is a good example. if you are interested, you can refer to php to implement the addition,
Godaddy hosts are abroad. The time zone conversion may be required when the site is built outside China. The following is a convenient tool function for time zone conversion.
The code is as follows:
/*
* Time zone conversion
*/
Function
CI batch data insertion. CodeIgniter is a compact but powerful PHP Framework. as a simple and "elegant" toolkit, it can build a fully functional Web application CI framework for PHP programmers.
The code is as follows:$ Sub_form = array ();$ Loop
Use the built-in php method mb_substr to intercept Chinese characters without garbled characters. it is very easy to use. For more information, see.
GBK encoding truncation example
The code is as follows:$ Str = 'who am I '; // A gbk-encoded
Php generates a barcode online. you can create a barcode generator for your reference.
The code is as follows:
Define ('in _ CB ', true );
Include ('header. php ');
$ Keys = array ('0', '1', '2', '3', '4', '5', '6', '7 ', '8', '9', 'A', 'B',
I will share an example of php array sorting and introduce the related knowledge, skills, experiences, and some php source code.
The code is as follows:
Class = 'pingjiaf' frameborder = '0' src = 'http: // www.bitsCN.com 'scrolling = 'no'>
Sort
Php comes with many extension modules, such as mbstring, gd, and pdo. Sometimes, to improve efficiency, you need to use C to implement some of the functions, you can write your own php extension module Ubuntu
The system is ubuntu 12.04 and apache
Php cannot open the excel file after downloading the excel file. For more information, see use php to download the excel file,
1. do not output any non-file information, such as echo log information, during the download process. Otherwise, the
This article mainly introduces a simple example of php getting a 301 jump URL. For more information, see
The code is as follows:
/**
* Get_redirect_url ()
* Gets the address that the provided URL redirects,
* Or FALSE if there's no redirect.
*
* @
This article mainly introduces php and jquery to add, delete, and operate instances. if you need it, refer to jQuery.
Php is used in the background, and jquery is referenced in the foreground to add and delete operations. the code is as follows:
This article mainly introduces php functions for traversing all files and subfolders in folders. For more information, see
The code is as follows:
Function my_scandir ($ dir)
{
$ Files = array ();
If (is_dir ($ dir ))
{
If ($ handle =
This article mainly introduces the PHP Database link class (PDO + Access). If you need it, please refer to the php pdo Access link.
The code is as follows:Class DbHelpClass{Private $ conn;Private $ qxId;Private $ ret;Function _ construct (){$ Path
This article introduces how to specify the default value of a function in php programming. we will share two examples for your reference in this section:
Specify the default value for the php function.
In php programming, set the default value for
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