PHP Array in Chinese sorting, file format is generally used UTF8, directly with the asort sort not. If GBK and gb2312 can. It's about coding. The code of GBK and gb2312 itself is sorted by pinyin.
Copy CodeThe code is as follows:
Function
For the day IP is not high or the number of concurrency is not a very large application, generally do not consider these! There is no problem with the general file operation method. However, if the concurrency is high, when we read and write to the
CodeIgniter processing user login Verification URL jump, mainly related to the my_controller.php page and login Verification Module user.php page, the specific code is as follows:
my_controller.php page:
Copy the Code code as follows: Class
PHP for synchronous remote mysql:
Requirements: Because the company's English-language site is placed in the United States, and the data of these sites to synchronize with the mainland server data. Synchronization time is within one day.After
In the project, encountered a demand, such as I want to intercept a string of strings, and do not want to intercept half of the word, read the PHP Manual of this mb_strimwidth () function, is said to not break the word, but the test did not succeed,
The class libraries that intersect other CodeIgniter, Tank_auth, are simple to configure, easy to use, and the author has been updating, and is now 1.0.9. 1.0.8 has supported the CI2.0, I am now the general project is to use it, so recommend to
Tank Auth is a library of Rights management classes for CodeIgniter and is powerful. Once the CI is integrated, the database is transferred to another server one day, and it is found that the user name and password before use cannot be logged
The specific usage is as follows:
$a =thumbimage (' 1.jpg ', 200,100, ' 2.jpg ');//1.jpg is generated with a width of 200, a height of 100 thumbnails, and saved as 2.jpgprint_r ($a);
Printing results:
Array ([Status] = 0[File] = 1.jpg[Width] =
PHP Conversion file encoding is a relatively simple thing, but in the development of the transmission of Chinese parameters, sometimes do not know what encoding, resulting in garbled phenomenon. Here's a very handy workaround that automatically
For example, I have a piece to display such news headlines, some one row a title, some row of two headings, there is a row of three headings, and to customize the title of color, style, etc., if you write to the loop inside, you think, is not very
A pair of 1024x768-sized pictures, cut to 240*240 size, cut not distorted, as far as possible to retain the theme of the picture.
The method I used:
1. First, the picture is shortened to the size that can be cropped;
In the case of a wide-format
1.array_merge () Merge
Example
The code is as follows
$array = Array (' a ' = = ' BB ');$array 2 = Array (' b ' + = ' cc ');$array 3 = Array_merge ($array, $array 2); The output result is Array ([A] = BB [b] = cc)
Suddenly I don't want to do anything, it feels like a big uncle. But you can't break the habit of blogging every weekday. So let's have some water today.
PHP used for almost 2 years, but this thing unexpectedly first saw, suddenly, feel that they
PHP Advanced Programming Learning Note 2014.06.09
This article describes the abstract classes, interfaces, and a technique called contract programming. Using these OPP mechanisms, the code you write is not limited to calculating or outputting
Using thinkphp, you find that you cannot use->order ($order) to sort.
$order = "Info.date2 desc";
It is a pity that the result order has become order by Date2 limit ... desc is gone.
Solution One:
$order there can be no space on either side,
Phpanalysis is currently widely used in Chinese parts of speech, using reverse matching pattern word segmentation, so compatible with a wider range of coding, now its variables and common functions are described below:
First, the more important
Original address: http://127.0.0.1/onsite/index.php/welcome/index/abc123
Modified after address: http://127.0.0.1/onsite/abc123.html
Copy the Code code as follows:
Rewriteengine on
Rewritebase/onsite
Rewritecond%{request_uri}
PHP 5.1.1 defines the following constants to provide a standard date expression method, which can be used for date format functions such as Date ().
Date_atom (String)
Atomic clock format (eg: 2005-08-15t15:52:01+00:00)
Date_cookie (String)
HTTP
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