Let's first assume that the code used in the database is UTF-8
In the PHP page we should first add
Copy CodeThe code is as follows:
The value Utf-8 here charset must be the same as the encoding type when the file is saved
Before database
Use PHP's Strtotime () function sparingly, phpstrtotime function
We in the daily business, for the volume of business, often using the database by time to do horizontal sub-table, the query after the table will often involve time issues. For
There is no difference in itself, the habit problem, but sometimes the problem involving operator precedence, the results will be different, recorded.
For example:
Copy the Code code as follows:
$p = 6 or 0;
Var_dump ($p);//int (6)
$p = 6 | | 0;
PHP obtains the MD5 of the file and verifies whether it has been modified.
Since it is necessary to determine if the uploaded file has been modified, the MD5 value of the uploaded file needs to be recorded, so here's how to get the MD5 value of the
PHP gets web file and path
PHP Gets the Web page file followed by the path:
echo $_server[' Document_root ']. ""; Get Server Document root variable
echo $_server[' php_self ']. ""; Gets the variable that executes the file server absolute path
Getjson cross-domain syntaxerror problem analysis, Getjsonsyntaxerror
Write a function yesterday: Click on the phone to verify the data at the same time to get the JSON side.
The JavaScript code is as follows:
$ (". Check_mobile"). Click (function (
PHP design mode-abstract Factory mode, design pattern factory
Before you learn this chapter, read the Simple factory model and the factory method mode
Under what circumstances should the abstract factory pattern be used:1. A system should not rely
Use PHP to get apk information on Linux systems, linuxapk
Recently in an APK mall, you need to upload the APK after the system automatically read the APK information (package name, version number, etc.), the background language using PHP, PHP to
Some of the powerful string handling functions that PHP has forgotten
List several forgotten in the PHP language but very powerful string processing functions, here is not the use of an example, interested friends can test themselves.
(PHP 4 >= 4.0.
Homemade PHP Development Framework Myqee Beginner Quick Start tutorial, Myqee Getting Started tutorial
I. Environment.
The author's environment is Win7 32bit flagship version. xampp1.7.4 (1.8.x version of the PHP version is too high, personally
PHP generated Baidu sitemap Site Map class function instance
Problem Overview:
The company's website is a question and answer Encyclopedia of the website, SEO engineers put forward the need to say according to the site's problems to generate XML
Unset,array_splice in PHP removes the difference between elements in an array
It is very simple to delete an array element in PHP, but sometimes deleting an array requires some ordering of the index and we will use the relevant function, here we
Wamp custom configuration after installation, Wamp custom after installation
Good memory than rotten pen, in a pit wandering two times the taste really bad!
After the wamp2.5 is installed, you manually reset the default root directory of the
PHP static methods with a few caveats, PHP
The examples in this article describe several common considerations for using static methods in PHP. Share to everyone for your reference. Here's how:
1. even if the method in the class is not declared
Smarty simple pagination Implementation method, Smarty paging implementation
The example of this paper describes the implementation of Smarty simple paging, shared for everyone to reference. The implementation method is as follows:
The following is
PHP MCrypt-based encryption and decryption instance, MCrypt encryption and decryption instance
This paper describes the method of PHP encryption and decryption based on MCrypt. Share to everyone for your reference. The implementation method is as
PHP saves the binary raw data as a picture of the program code,
Get post binary raw data, choose a generated path and the name of the picture, then write, the idea is obvious
Generate picture $imgDir = ' uploadimg/'; $filename = "NISSANGCJ". $
How PHP identifies a computer or mobile phone to visit a website
Now through the mobile phone access to the site more and more popular, if we want to count the website through the PC, mobile phone mobile side of the situation, or need to do some
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