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
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
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
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
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
Running in a php5.3 environment often occurs
deprecated:function ereg () is deprecated in .... and Deprecated:function ereg_replace () are deprecated in .... These types of error prompts.
The reason for this is that the php5.3 version does not
Do not make changes here, maintain the default selection
Click the browse button to change the installation directory to D disk
Change the Web Server port to 85 to avoid conflicts with IIS
Installation completed due to a configuration
Because the company's website before the user head is stored in their own server, and later feel the management is inconvenient, the new user avatar has been uploaded to the seven cattle, in order to facilitate the unified management, the leader
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
1. Upload Form upload.html
Copy Code code as follows:
1. Note This is a label, we want to implement file upload, must be designated as Multipart/form-data, otherwise the server will not know what to do.
2. It
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
Search for keywords in search engines. htaccess cache, you can search for a lot of information about setting up Web site file caching tutorial, through the settings can be CSS, JS and other infrequently updated files cached in the browser side, so
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
Copy Code code as follows:
$num = 1220.01;
echo Fmoney ($num);//Result: 1,220.21
echo Umoney ($num);
Result: one thousand and two hundred twenty dollars and twenty-one only
Echo Umoney ($num, "RMB");
Result: one thousand and two hundred
For local, we can use Windows with the lookup to find, but for online, such as looking for FTP space inside the file, this program is very useful.
PHP file Finder source code:
php version File search (file search) file Lookup (note:
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