Php coding and Chinese garbled characters solution
[Mysql]
Default-character-set = utf8
[Mysqld]
Default-character-set = utf8
Default-storage-engine = myisam
Add the following under [mysqld:
Php code conversion example
/*
* Common coding problems
*
* 1. page garbled characters:
* The garbled page is mainly because the encoding of the display font is inconsistent with the encoding
I'm not afraid of ten millions of people blocking, just afraid of surrender
I think I should be the youngest in s22's brothers. In fact, when I was 17 years old, I liked to play with my website. at that time, I felt very curious when I
Php obtains the execution time of the target function.
/**
* Class EfficiencyTester
* Efficiency tester: test the function running time
* @ Version 1.0 2013.04.13
* @ Author Kross
*/
Php webpage title garbled characters
You can solve the problem of Chinese garbled text. of course, you can also change charset = utf-8 to charset = gb2312, depending on your webpage code. Php
Php regular expression filtering for special characters
This article describes how to filter special characters in php programming. For more information, see.Use regular expressions in php to filter out special characters. you can use the
PHPextract () function usage php array splitting
In action. php, you only need to use the extract () function to unbind the $ _ POST global data: action. php
Common escape character functions in PHP
This article describes common character escape functions and security functions in PHP. these functions can be used to filter out most common attack methods, such as SQL injection.This section
Php and mysql server configurations
Zend_optimizer.optimization_level = 15
Zend_extension_ts = "d: phpendoptimizer. dll"
The zendoptimizer. dll path must comply
Find extension_dir and add the full name
Php configuration file application example
If (strstr (strtoupper (PHP_SELF), \ "/PHPTEST /\"))
Echo \ "my ads!\";
?>
In this case, you only need to set auto_prepend_file = "myprefix. php", then all
PHP character string special symbol filtering method
Filter methods for special characters of PHP strings:
Sometimes we may encounter the problem of filtering special characters in strings. This article provides a method to process Special strings,
Sample code for collecting out-of-site content from phpcurl
// Initialize a cURL object
$ Curl = curl_init ();
// Set the URL you want to capture
Curl_setopt ($ curl, CURLOPT_URL, 'http: // bbs.it-home.
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