First of all, the MySQL character set problem. Windows can be modified by modifying the My.ini in the
PHP code
Copy CodeThe code is as follows:
[MySQL]
Default-character-set=utf8//Client's default character set
[Mysqld]
Default-character-set=utf8
First, security
No matter how the program is written, first of all security is the first, no security procedures can not talk about high-quality.
Second, stability
No matter how bad your code is, you have to be able to run it steadily.
third,
At such times your statistical system (probably quantum, Baidu, etc.) is not statistically. However, we can use some anti-attack software to achieve, but the effect is sometimes not obvious. Below I provide a section of PHP code, can play a certain
Knowledge Points:
1. Introduction to JSON data format
2. Encode the data into JSON format
3, decoding the JSON data, and operation
The JSON data format is represented in the following way:
Copy CodeThe code is as follows:
{"Programmers":
Background:
Add an app called "Ad steward" (an ad-serving app for CNZZ) in the Phpwind site, and the entire "Ad steward" app is loaded through an IFRAME, loading specific content based on different sites to show specific content for that site, to
Preparatory work:
① will first use the thinkphp framework
② better have some Ajax basics (you can go to the other blog: Ajax Real-time verification "username/mailbox, etc." is already present)
③ 4 JS Documents (click here to download free
Here we talk about some of the features of this function through an experiment.
Function prototypes
BOOL Spl_autoload_register ([Callback $autoload _function [, bool $throw = True [, bool $prepend = false]]])
Version compatible
PHP 5 >=
In fact, there is no technical content, of course, directly affixed to the code, no nonsense,
But in fact, the development is still very useful, such as forum posts, such as scarf and other related applications
Copy CodeThe code is as
If you have a large array, and all you have to do is find a given value that exists, you can use In_array () to return True or false. The following code will output "not found the This array" because you will be looking for a "alber" in $namesarray
Cisa a method to submit to the official PHP BUG page
Copy CodeThe code is as follows:
/**
* Fix PHP 5.2.6 or later Array_diff () function in processing
* Large array of problems that take an extra long time
*
* Finishing: http://www.CodeBit.cn
*
Asort () Definition and usageThe Asort () function sorts the array and maintains the index relationship. It is primarily used to sort the associative arrays that are important for the cell order.
The Second optional parameter contains an additional
Array_search () Definition and usage
The Array_search () function, like In_array (), looks for a key value in the array. If the value is found, the key name of the matching element is returned. Returns False if it is not found.
Before PHP 4.2.0,
So it is doubtful whether the coding problem, or the file permissions problem, or is not the function of the problem, after the investigation found that the original is WAN L1 host does not support Fsockopen, in the file uc_client/client.php
Copy CodeThe code is as follows:
Our domain, here can not be unique
$domain = ' localhost ';
This should be CNZZ authorization to SHOPEX encryption key, if wrong, can not quickly apply for an account
$encodestr = ' a34dfwff ';
This is the URL
array_count_values () Definition and usage
The Array_count_values () function is used to count the occurrences of all values in an array.
This function returns an array whose key name is the value of the original array, and the key value is the
A long time ago know that there is a class called Phpexcel (the official website) can be used to operate Excel, has never had the opportunity to try, today, the trial found very powerful, the download of the source package has detailed documentation,
A function and an object are as follows:
Copy CodeThe code is as follows:
var doubling=function (x) {
return x*2;
};
var obj={
VAL:100,
};
When the function calls the pattern, this is bound to the global object. This behavior can also be
For example: ' Xu ' has been json_encode processed and changed to ' \u80e5 ', and the Chinese part of the final JSON is replaced with Unicode encoding. All we have to do is convert the object to JSON and make sure that the Chinese inside the object
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