There are very handy ways to reorder arrays in PHP--asort, the use of Asort can be seen here. However, when sorting an array containing Chinese keys, asort is sometimes not in alphabetical order. This is mainly a coding problem, if the encoding for
First, the realization principlein the PHP function, the global syntax is more common, we must all know once in the function of global an external variable, this variable can be used in this function, but there are many users do not know what this
Here I would like to summarize some of the information that gets the URL in the address bar and my path to the file that it belongs to:Using $_server[] We can do a lot of things: it's an array of headers (headers), path information, and script
Today friends in the group asked the next bitwise and/or questions.
PHP has been working for 1 years, probably not familiar with this one. Introduce this part to the novice friend here.
By being located primarily on the binary number operation.
PHP htmlspecialchars, Strip_tags, addslashes is a common function in Web page program development, today to detail the use of these functions:
1. Function Strip_tags: Remove HTML and PHP tags
Note: This function removes any HTML and PHP tag
The difference between error and exception access to the online data is mostly Java explanation, seemingly PHP exception handling process and Java almost
The object inheritance structure in Java is as follows:Object---->throwable--------> Exception
In general, PHP often uses file_exists () to determine whether a file or folder exists, returns True if it exists, or returns false. However, the function does not return the correct value for the Chinese file name or folder name when the Web page
This article describes a concise and practical PHP caching class, which can be used to check whether the cached files are set to update time, clear cache files, generate cached file names based on current dynamic files, create directories
In some PHP projects we often see some PHP files in the code is only the start tag, but not the end of the tag, then under what circumstances can not write this end tag, and under what circumstances must write?
Let's take a look at 2 examples:
The
One, use the keyboard response, without refreshing this page to verify the form input is legitimateThe user triggers a response event through onkeydown and onkeyup events. The use method is similar to the onclick event. OnKeyDown means that when a
Caching technology is widely used in practical use, which can effectively reduce the access pressure of server database and improve the running speed. At present, many CMS content management systems frequently use caching mechanism to improve the
A few days ago in the question and answer section to mention this problem, all the friends who answered the question said that it is impossible to achieve through PHP, the intern responsible for me to help me find a way, seemingly through the NTLM
Strip_tagsGet rid of HTML and PHP tags.
Syntax: string strip_tags (String str);
return value: String
Types of functions: Data processing
Content Description
This function can remove any HTML and PHP tag strings contained in the string. If the HTML
What is Http_build_query?
Generates a Url-encode request string using the given associated (or subscript) array. Parameter formdata can be an array or an object that contains attributes. A formdata array can be either a simple one-dimensional
Ob_start () function is used to open a buffer, such as the header () function, if there is output before, including carriage return/space/line break/will have "Header had all ready send" error, you can first use Ob_start () The data Block and Echo ()
If you use the Base64_encode and Base64_decode methods directly, the generated string may not apply to the URL address. The following method resolves the problem:
URL-safe string encoding:
Copy Code code as follows:
function
PHP Conversion file encoding is a relatively simple thing, but in the development of the transfer of Chinese parameters, sometimes do not know what is encoded, the result of the phenomenon of garbled. Here's a very handy solution to automatically
Preparatory work1. Access to mobile phone registration application Devicetoken (iphone registration when the application returns a unique value Devicetoken)
2. Get Ck.pem file (do phone-side to)
3. Get pass phrase (do phone-side)
testpush.php File
Copy Code code as follows:
PHP needs to turn on SSL (OpenSSL) support
$apnsCert = "CK.PEM";//Certificate license file when connected to APNs, the certificate needs to be created as required
$pass = "123456";//Certificate Password
$SERVERURL =
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