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.
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
PHP is a server-side scripting language used to develop dynamic Web applications. No good server-side debugging tool is one of the limitations compared to Java. We usually add echo, var_dump, and so on in the PHP code to display the variable, the
What can File FileReader do?Ajax File Upload Example
The FileReader object can read the BASE64 encoded data (readasdataurl) of the file, the 2 binary string (readasbinarystring), the text (Readastext), and are all asynchronous.
Yes, email drag
Before you know the regular expression, need to master some commonly used regular expression of the basic knowledge, these if you can remember the best remember, remember need to use when can be found on the line, on a number of special characters,
You can use the following section of code to specifically understand the PHP bulk upload pictures of the specific way. When we are learning PHP, we must accumulate experience from the actual operation to consolidate the knowledge we have learned and
The first and last day of the week
Copy Code code as follows:
$date =new DateTime ();
$date->modify (' this week ');
$first _day_of_week= $date->format (' y-m-d ');
$date->modify (' This week for +6 days ');
$end _day_of_week=
Because the configuration of PHP generally with data, exactly and JS in the general representation of objects, so you can:
Copy Code code as follows:
Copy Code code as follows:
var $strings ={};
$strings
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
PHP has a very convenient to disrupt the array of functions shuffle (), this function in many cases will be used, but the JavaScript array does not have this method, it does not matter, you can expand A, do-it-yourself, well-clothed.
Please refresh
Nonsense not much to say, directly on the code.
Copy Code code as follows:
Set time zone
Date_default_timezone_set (' Asia/shanghai ');
/**
* Seconds turn time, format month day time seconds
*
* @author wangyupeng129@126.com
*
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
Black Hat SEO means that there is a trick that everyone is using, in the server to judge the client browser user-agent and then do further operations,
There's always someone on the Internet using this code first a JS code to determine the site
What the hell is the Magic method?Magic method, also called Devil function. As long as you learn that PHP knows what a magic method is, a magic method is a function that executes automatically under certain conditions.PHP's Magic method mainly has
Php obtains the browser type of the visitor's browser page.
The method is as follows:
Check your agent string, which is part of the HTTP request sent by the browser. Use $_SERVER['HTTP_USER_AGENT']Obtain the agent string.
For example:
It may be
Php obtains gender and birthdate from the ID card, and php gender Birthdate
// Query the Gender and birthday by ID card number $ birth = strlen ($ idcard) = 15? ('19 '. substr ($ idcard, 6, 6): substr ($ idcard, 6, 8); $ sex = substr ($ idcard,
Analysis on public account OAuth2.0 webpage authorization and oauth2.0
According to the requirements, What I completed today is the webpage authorization and some basic information of the user.
1. Modify basic webpage authorization information. Open
Php uses curl to call interface methods, get and post, and curl.
The first is the client execution method ApiModel. php:
$ v) {$ o. = "$ k = ". urlencode ($ v ). "&" ;}$ post_data = substr ($ o, 0,-1); $ key = md5 (base64_encode ($ post_data); if ($
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