Php compression function (gzcompressgzuncompress) compresses the string
// Example of string compression
$ String =
"Http://bbs.it-home.org is php technical website. This website is personal website.php8848.
Php obtains the id of the inserted mysql data.
Mysql_query ("select max (id) from t1", $ link );
This method is used to obtain the largest value of id, which is indeed the last value. However, when multiple threads are
PHP methods for obtaining domain names
// Method 1 (using system variables)
// Disadvantage: Do not use the passed address or host that does not support system variables
Echo $ _ SERVER ['http _ host'];
Apache + php file size limit modification method
This section describes how to modify the size limit of uploaded files in apache and php environments. For more information, see.To solve the php file upload size limit, you must not only
Solve phpcsv file import mysql Chinese garbled
When using php to import csv files to the mysql database, Chinese characters are garbled. here is the solution. For more information, see.Many methods are used to read and upload csv files
Function for verifying the ID card number in PHP
Function validation_filter_id_card ($ id_card ){
If (strlen ($ id_card) = 18 ){
Return idcard_checksum18 ($ id_card );
} Elseif (strlen ($ id_card) = 15 )){
Intercept functions of php mixed Chinese and English strings
/**
* Intercept Chinese and English strings.
* By bbs.it-home.org
*/
Function mb_str_split ($ string ){
# Split at all
PHPMySQLOrderBy keyword usage
SELECT column_name (s)
FROM table_name
Order by column_name
Note: SQL is case insensitive. Order by is equivalent to order.For example, select all the data stored in the
When exporting csv files in php, the ID card number cannot be counted scientifically.
When using php to export a csv file, the ID card number cannot be displayed in scientific notation. For more information, see.In fact, it is very
Example code of php5 image verification code
Header ("Content-type: image/jpeg ")
The GD Library has the corresponding image types: imagejpeg (), imagegif (), imagepang ()5. iamgeline (resource image, int x1,
Php intercepts Chinese strings (without garbled characters)
$ Str = 'who am I '; // A gbk-encoded string
Echo mb_substr ($ str, 0, 1, 'gbk'); // output me
The mb_substr method has one more
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