1. What is session
2.Session from the User access page, to disconnect from the Web site to form a session life cycle. During a session, the client is assigned a unique sessionid to identify the current user and differentiate it from other
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
PHP is no exception! A static method (property) is a property or method that is annotated with a static keyword (for example, a static property public static username;)The biggest difference between static and Non-static methods is that their life
PHP header to define a PHP page for UTF encoding or GBK encoding
PHP page for UTF encodingHeader ("content-type:text/html; Charset=utf-8 ");
PHP page for GBK encodingHeader ("content-type:text/html; charset=gb2312 ");
PHP page for BIG5
Using php5.3 or above we can use PDO and mysqli to process data directly
1. Use PDO (PHP Data Objects)
The code is as follows
Copy Code
$stmt = $pdo->prepare (' SELECT * FROM employees WHERE name =: Name
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
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,
Many places in WordPress use Stdclass to define an object (usually in the form of an array), and then use Get_object_vars to "convert" the defined object to a number of groups.
As shown in the following code:
Php
$tanteng = new StdClass
The number of rows affected by an update operation in MYSQLI can be returned in two ways:
1. Returns the number of rows matched
2. Returns the number of rows affected
By default, the value returned by Mysqli_affected_rows is the number of rows
1. File () function
The file () function reads the entire document into an array.
Similar to file_get_contents (), the difference is that file () returns files as an array. Each cell in the array is the corresponding line in the file, including
Overview: The network Silver payment interface and Alipay interface is roughly the same, the main difference is that the bank of communications to provide the core of the interface, such as encryption, such as through the Java implementation. So, to
The original is based on the user input of the digital judgment and then converted to the desired capital number, if we first put the case of an array, and then judge the conversion is OK.$data = $_post[' RMB '];if (!ereg ("^[0-9.]", $data)) Die ('
The first file name is Phplist.inc
The code is as follows
Copy Code
?Global $htmlroot;$htmlroot = "/web/html"; "/web/html" is the Apache document root directory that users can modify according to their own configuration?>
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