First, the core points of thinking:
1. What global variables are outdated and how to handle them?such as: unset ($GLOBALS, $_env, $HTTP _get_vars, $HTTP _post_vars, $HTTP _cookie_vars, $HTTP _server_vars, $HTTP _env_vars);2. What global variables
Defining constants in PHP is done through the Define () function, but defining constants in a class cannot use define (), and you need to use the const modifier. Constants in a class are defined by using const, and they are accessed in the same way
Val () has a lot of lethality for PHP security in general, to prevent needs to be banned from breaking the door.
It's wrong to say that using disable_functions to ban Eval is a lot on the web.
In fact, eval () cannot be banned with
When using the Sina payment interface, need to create an interface, just by the summer blog a new Sina interface, the integration of the FANGWI Peer-to-peer Network Loan system, the following interface or relatively simple, just a binding
The most common applications are in user login and some API data exchange scenarios.The author contains some of the more classic PHP encryption and decryption function code, to share with you. Encryption and decryption principle is generally through
This is a brief introduction to compiling PHP and its extended memcache, and it is recommended that you read the official document (address) before reading the following. Here we take php5.3 as an example.
First, the compilation environment
Select
Development, basically will display_errors,error_reporting open, help improve development efficiency, on-line, basically will turn off the page error information, in the error information, put in the file.
One, the error_log configuration of
(1) Open the PHP tutorial security mode
PHP's Safe mode is a very important embedded security mechanism that can control functions in PHP, such as System (),
At the same time, a lot of file operation functions are controlled by permissions, also
We can use the Extract () function, such as adding extract ($_post) to the front of the receiving page script, extract ($_get), such statements, and exporting several super variable array values for the form processing, as shown in the following
PHP filter special characters and SQL anti-injection codeMethod OneFilter ', ', SQL nameAddslashes ();
Method Two, remove all HTML tags
Strip_tags ();
Method three filters may generate code
function Php_sava ($STR){$farr = Array ("/s+/","/]*?) >/
There's been a very hot question recently--print or sort the two ordered arrays. Just see this problem when also a bit of Mongolia, the best algorithm must use the orderly characteristics.
Think of a will find it is not very difficult, if the array
Dichotomy (Dichotomie) is the method of splitting in two. Set the closed range [A,b] to R. The successive binary method is to create the following interval sequence ([an,bn]): A0=a,b0=b, and for either natural number n,[an+1,bn+1] or equal to [AN,CN]
The session is mainly divided into two parts:
One is the session data, which is stored by default under the server's TMP file and is in the form of a file.
Another is marked session data session Id,session ID, is that session file file name,
There are a lot of functions in PHP that we rarely hear about, but they have very useful functions, such as glob (). Many people want to simply traverse the directory, if you know this function, will be twice the effort.
Glob is included in the
PHP has a surprising ability-you can use its server-side script to create dynamic graphics. This function is based on the GD library, which is designed by Thomas Boutell ANSI C library, which is supported in addition to the library. Most common
//
Original works
Original site: www.111cn.net
Author: noodles Love rabbit qq:271728967
NOTE: Reprint please explain the original out http://www.111cn.net
//Now to talk about post.php file, post.php file is very simple, this does not
The code is as follows:Copy code // Function name: CheckEmailAddr ($ C_mailaddr)// Usage: determines whether the email address is a valid email address.// Parameter: $ C_mailaddr (email address to be detected)// Return value: Boolean// Standby
-Design a program process1. Functional requirements2. Page design3. Database design4. Code design5. Debug and release-Form1. form> 2. method: method for transferring form data to the serverPost (indicates embedding form data in an Http request)Get
Today, however, I found that the _ autoload magic method is too specific or you are willing to call it a magic function. When he loads the class files to be included, he does not even need to declare anything other than the class defined in 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