1, today in Hacknews to see a lot of people on the messagepack debate. First understand what is the messagepack:messagepack is a binary-based efficient object serialization library. IT enables to exchange structured objects between many like JSON.
Definitions and usage
php function Microtime () returns the current Unix timestamp and microsecond number.
php function Microtime () syntax
Microtime (Get_as_float)
php function microtime () parameter and description
Get_as_float If the get_as_float
Today I saw a PHP manual with this paragraph:
"When dealing with the arithmetic of character variables, PHP follows the custom of Perl rather than C." For example, in Perl $a = ' Z '; $a + +; will turn $a into ' AA ', and in C, a = ' Z '; a++; The
Two-dimensional arrays are often encountered in PHP development, but his ranking is not as convenient as a one-dimensional array with built-in functions, the order of two-dimensional arrays needs our own Write function processing, here Uncletoo to
Building Excel is of course using the Phpexcel class library, but it's too cumbersome to be a little bit less worthwhile as long as it's a simple build.
What is simple, the database data import into Excel on the line, this is simple
Let's look
Copy Code code as follows:
/**
*1. A couple of days ago, a guy at work, they led him to write a class that generates files: Makefile, file type support: TXT, HTML, CSV, PDF, doc (or docx).
*
*2. The generated content is a table (like a
When we write data to MySQL, for example:
Copy Code code as follows:
mysql_query ("Update table set ' title ' = ' Kuhanzhu ' blog '");
That's going to go wrong. As with ASP, the database is allergic to single quotes. And
We are today to introduce you to the PHP to obtain the current URL function of the specific method, through the understanding of this function method, further deepen our understanding of the PHP language, improve our learning level.
Examples of PHP
Nothing to say, directly on the code, you can add your own watermark function:
Copy Code code as follows:
/**
*
* @author Zhao Jinhan
* @date January 13, 2014 11:54:30
* @email xb_zjh@126.com
*
*/
Header (' content-type:text/html;
First figure out, what is BOM header? When you save a text file in UTF-8 format with a program like Notepad under Windows, Notepad adds a few invisible characters (the EF BB BF) to the front of the file, which is the so-called BOM (Byte Mark).Not
There are many ways to verify mailbox addresses. In the browser side, JS mailbox authentication can be detected through regular expressions.
Like what:
Copy Code code as follows:
function Isemail (email) {
return/^ (([a-z]|\d|[! #\$%& '
1. Sys_getloadavg ()
SYS_GETLOADAVT () can obtain the system load condition. The function returns an array of three elements, each representing the average load of the system in the past 1, 5, and 15 minutes, respectively.
Rather than letting
PHP generates a short URL
Principle:
1. The original URL do crc32 check, get the check code.
2. Use sprintf ('%u ') officers transferred Guevara code to convert to unsigned digits.
3.62 Operations for unsigned digits (uppercase and lowercase
The serialization and deserialization of objects in web development is often used, more mainstream JSON format and XML format serialization and deserialization, today want to write a small demo jsop, the results found that will not use PHP
Obviously, Php+mysql+apache is a very popular web technology, this combination is powerful, scalable, or free. However, the default settings for PHP are not as appropriate for Web sites that are already online. The following changes the security
PHP in the writing will sometimes user page jump, here collected a few good jump methods, you can use.
Using HTTP header information to implement
That is, using the header function of PHP. The function of the header function in PHP is to issue to
1, PHP encryption and decryption
PHP encryption and decryption functions can be used to encrypt some useful strings stored in the database, and through reversible decryption of strings, the function uses Base64 and MD5 encryption and decryption.
This article describes the implementation of PHP based on JS sprintf function. Share to everyone for your reference, specific as follows:
The functions are as follows:
The first parameter is a string containing the "%s", and the other
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