Copy codeThe Code is as follows:Function hex2rgb ($ color ){If ($ color [0] = '#'){$ Color = substr ($ color, 1 );}If (strlen ($ color) = 6 ){List ($ r, $ g, $ B) = array ($ color [0]. $ color [1], $ color [2]. $ color [3], $ color [4]. $ color [5]);
Gzip can compress the webpage size to accelerate the speed of opening the webpage. Currently, almost all mainstream browsers support this function, but enabling Gzip requires support from the server, here we simply use php to determine whether the
1. When array is a continuous array starting from 0, the result of json_encode is a string enclosed [].
When array is an array that does not start from 0 or is not continuous, the result of json_encode is a string in the key-value mode enclosed {}.
The JSON data parsing method using jquery is used as the transmission object of jquery asynchronous requests. The result returned by the jquery request is a json object, which is considered in the form of a JSON string returned by the server, JSON
Eclipse itself has the cvs plug-in. we can also add the svn plug-in eclipse. for details, see install and use the svn plug-in eclipse, but in the left-side bar of eclipse ,. svn ,. the cvs file is displayed, and the directory is very long, so it is
FNR: it also indicates the number of current records, but FNR is only in one file. if the file is re-opened, FNR starts from 1.
1. differences between NR and FNR
NR: indicates the number of current records.
FNR: it also indicates the number of
Do not use the GET method for insecure or non-idempotent operations, because such operations may cause permanent, infeasible, and non-conforming resource changes.
Each HTTP method has a specific principle.GET aims to GET a resource expressionPUT is
There are three main types of shell loops: for, while, and untilshell. There are two main types of branch judgment: if and case.
1. for loop
#! /Bin/bashfor file in $ (ls/tmp/test/mytest | grep sh) // for in is the basic format of shell, the
Apache also provides static files such as js and css for packaging and compression modules. However, this document does not deploy static files in this way, it is a combination of smarty to package js and css files on the website.
I. Why do I use
Among them: tp is a domestic framework with the most comprehensive materials. it is relatively simple to learn. we recommend that you learn and support Chinese products ~
Yii Framework learning
I. common php frameworks
CI tp (thinkphp)
Many people say that an algorithm is the core of a program. if a program is better or worse, the key is its advantages and disadvantages. As a beginner phper, although seldom touched on algorithms. However, for bubble sorting, Insertion sorting,
PHP provides such a data format. Data can be shared between requests without passing data through the address bar. This type of data is called session data.
PHP provides such a data format. Data can be shared between requests without passing data
When you use the groupby group for query, the default group is sorted, which may reduce the speed. adding orderbynull after groupby can prevent sorting 1. when you query by group by, the default group is sorted, which may reduce the speed. adding
Array_merge () when the element with the same subscript appears: If the index subscript is the same, the subscript of the array ($ arr2) element is incremented according to the subscript of $ arr1, merge. If the associated subscript is the same, the
The progress has been very slow since the update in December May ~ After that, Penguin opened the menu application permission, which is more user-friendly than the command method. A project of the company draws a UI by itself. it looks okay, so it
The buffer actually opens up a region in the memory and can be considered as a large string in the memory. When the program has characters to output, the content to be output will be appended to the buffer.
The buffer actually opens up a region in
Question: You want to know whether a string contains a special substring. For example, you want to find the email address containing. Solution: Use the strpos () function to find the substring
Question: You want to know whether a string contains a
If it is a json string, you can directly convert the string to an object or array through the json_decode function.
Convert object to array
/*** Convert object to array */function object_to_array ($ obj) {$ _ arr = is_object ($ obj )?
PHP5.5.0 is officially released, and brings a complete list of new features and functions. One of the new APIs is PasswordHashingAPI. It contains four functions: password_get_info (), password_hash (), password_needs_rehash (), and password_verify ()
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