Sometimes in the project we need to use PHP to encrypt specific information, that is, through the encryption algorithm to generate an encrypted string, the encrypted string can be decrypted by decryption algorithm to facilitate the process of
This article describes the function is actually a PHP manual, but because these functions are strong independence, find not easy, so a separate introduction, convenient access.
1. Get all available modules-get_loaded_extensions This function returns
Variable get,post,session cannot be passed between "1" pages in the latest version of PHP the automatic global variable is turned off, so to get the submitted variable from the previous page use $_get[' foo '],$_post[' foo '],$_session['. Foo '] to
You can define a __clone () method in the object class to adjust the clone behavior of the object. The code for this method is executed during the cloning operation. In addition to copying all existing object members to the target object, the action
The example of this article describes the implementation of PHP+AJAX implementation without refreshing paging. Share to everyone for your reference. Specifically as follows:
Limit offset, length;Limit 0, 7; First pageLimit 7, 7; Second pageLimit 14,
Using a PHP program to delete directories and files has many advantages over FTP deletion. First into the FTP is more trouble, then delete a large number of files when the FTP deletion is very slow, there is the program just want to delete the files
Today in doing export Excel, always to test the exported Excel file, frequent download and open, very troublesome to write a section of code coherent server export excel==> download Excel files to the local ==> and open the operation.
Here to draw
This article illustrates the multithreaded operation that PHP uses with Pthread implementations. Share to everyone for your reference, specific as follows:
res = ' No, first run. '
$this->param = 0;
$this->lurl = 0;
$this->name =
PHP Regular Expressions Learn note sharing:
1. Creating Regular Expressions
$regex = '/\d/i ';It's a bit like the first way in JavaScript, but the word here is a string.
2. Special characters in regular expressions
Special characters are: . \ +
To achieve the GZIP compression page requires a common browser and server support, is actually the server compression, uploaded to the browser after the browser decompression and resolution. Browsers don't need us to worry because most browsers now
On the issue of JSON, Lu continued to ask me a novice friend, such as why I output is {"1": "Item1", "2": "Item2", "3": "Item3"} instead of ["Item1", "item2", "Item3"].
PHP Arrays and JS arrays
I use PHP 5.4 above syntax to express here.
PHP for
The project is used for temporary writing. To be perfected:
Copy Code code as follows:
/*
* According to the user submitted (swf/html) address, access to Youku, potato SWF playback address
* */
Private Function _getswf ($url = ' ") {
To determine whether a client uses a proxy server, you can judge from the environment variable information sent by the client.
Specifically, look at the Http_via field, if this field is set, the client uses a proxy server.
Anonymous levels can be
First, directory operations
The first is the function read from the directory, Opendir (), Readdir (), Closedir (), which is used to open the file handle first and then iterate over the following list:
Copy Code code as follows:
Before you begin, there are two things to clarify: first, support for open source is not equal to opposing code encryption; second, if you take something that is not your own (for example, a company) to open source, it should not be.
Previously
Simple PHP gets the Linux server state code, not much more-directly on the function:
Copy Code code as follows:
function Get_used_status () {
$fp = Popen (' top-b-N 2 | grep-e "^ (cpu| mem| Tasks) "', ' r ');/get a moment system CPU
This article for you to share a particularly simple PHP form submission instance, the specific implementation steps are as follows:
The instance code is as follows:
password: age: 16" > Less than 16 16-30 31-50 51-80 Self
This article summarizes two PHP unlimited class implementation code, there is a need to learn friends can refer to.main idea: first look at the third and fourth lines, the value of the parent class ID (parentid) is 1, representing the subclass of
The so-called paging display, that is, the result set in the database for the artificial section of the display, here need two initial parameters:
How many records per page ($PageSize)?
What is the current page ($CurrentPageID)?
Now just give me
This example describes the usage of the Registrar mode class in PHP. Share to everyone for your reference, specific as follows:
Register Read and Write classRegistry.class.php
offsetset ($name, $value); /** * Gets the value of an item 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