When the PHP server interacts with the client and provides an open API, it usually requires data encryption for the sensitive part of the API data transmission, when RSA asymmetric encryption can be used, and here is an example to illustrate how to
Des encryption is a symmetric encryption in the Internet application of a number of encryption methods, PHP through the MCrypt extension library to support DES encryption, to use DES Encryption in PHP, you need to install the MCrypt expansion
Permanent login refers to the mechanism for continuous validation between browser sessions. In other words, today's logged-in user is still logged on tomorrow, even if the user session between multiple accesses expires. The presence of permanent
Objective
We are writing a Web program, always think of their own site more beautiful, more functions, and sometimes write small tools or add small plug-ins will make our site more perfect. such as the calendar function, such as we now want to talk
One: The soap of PHP itselfAll webservice include the service side (server) and clients (client).The first thing to do with PHP itself is to install the extension and enable it. Look at the specific code belowFirst, this is the service-side
Several files that need to be modified:
①register.php generates random numbers and encrypted values
Change the register.html to register.php, and open the session;
Write the function of the random number in the register.js in the register.php,
The code for the operation is as follows:
Copy Code code as follows:
$USR = new User ();
echo Json_encode ($USR);
?>
Very simple code, no Chinese situation all normal, the output is as follows:
{"PlatformID": "123213",
Before looking at some PHP framework source code, very strange in the file contains, will use DirName (__file__) to patchwork file path, do not know what the benefits, then finally found the reason.
Let's look at a simple example:
There are a,b,c
The JSONP output in PHP is generally in the following format:
Copy Code code as follows:
Callbackname (' JSON string ');
If the middle JSON string contains single quotes, the output is problematic and the caller is generally not
This example describes how PHP uses Jpgraph to draw a 3D pie chart. Share to everyone for your reference. The implementation methods are as follows:
setshadow ();
$graph->title->set ("annual income and Expenditure Statement");
The UUID full name is the universally unique identifier, which is an identifier that can be generated using any computer, without requiring a central database for management, which guarantees that there is little chance of duplication. The range of
The command format is:
BOOL Rename (string oldname, string newname [, resource context])
Below is a demonstration of the specific application of rename:
File location as shown:
Objective: 1. renamed Cache.txt as Rename.txt;
2. Rename the
This article is an example of how PHP automatically adds links to URLs. Share to everyone for your reference. The implementation methods are as follows:
Here automatically match the page URL, including Http,ftp, and so on, automatically add links
Page jumps may be triggered by a user clicking on a link, a button, or a system that is automatically generated. Page automatic jump in the Web development is often used, and according to the requirements can be different jump mode, such as the
For example, there are two memcached modules in Pecl, Memcache and memcached, and most PHP environments use a memcache version with no d in the name, which is released earlier and is a native version, The corresponding memcached version with D is
Eval can be used to execute any other PHP code, so be careful with the Eval function found in the code, probably the Trojan
This sentence to kill people, so that anyone can post any file up, so to do a good job of guarding against
The use
Due to its own shortcomings, the inheritance relationship has been buttoned up by experts on the "evil" hat. "Use delegated relationships instead of inheritance relationships", "Try to use interface implementations instead of abstract class
Agent refers to the role of a character acting on behalf of another, like in life, a wine manufacturer, is not directly to the red wine retail customers, are through the agency to complete his sales business. And customers, also do not have to drink
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