Differences between the array sorting function array_multisort and uasort in php
Function my_sort ($ a, $ B)
{
If ($ a = $ B) return 0;
Return ($ a> $ B )? -1: 1;
}
$ People = array ("Swanson"
Two methods for php to automatically generate a new password
/*
* Php automatically generates a new password user-defined function
Applicable environment: PHP5.2.x/mysql 5.0.x
Code author: xujiajay
A simple example of generating a word file using php
/**
Php generates word files
Link: bbs.it-home.org
*/
$ Word = new COM ("word. application") or die ("The Word program cannot be started!
Php array sorting method sharing (bubble sorting, select sorting)
Function maoPao ($ arr, $ style) // The default value is passed, not the address. If you add an ampersands (&) before $ arr, it points to the same
Example of generating word in php
// Generate word
Header ("Content-Type: application/msword ");
Header ("Content-Disposition: attachment; filename = \" file.doc \"");
?>
Php class for reading xml
#------------------------------------------
#
# XML Library, by Keith Devens, version 1.2b
# Http://keithdevens.com/software/phpxml
#
# This code is Open
Php can be used to obtain the real IP address of the Internet.
Function get_onlineip (){
$ Ch = curl_init ('http: // www.ip138.com/ip2city.asp ');
Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, true );
$ A
Code for converting php xml to an array
// Xml to array, including the root key, ignore empty elements and attributes, there are still major errors
Function xml_to_array ($ xml)
{
$ Reg = "/] *?>
Four Chinese character string truncation functions in php
// Truncate a Chinese string
Function mysubstr ($ str, $ start, $ len ){
$ Tmpstr = "";
$ Strlen = $ start + $ len;
For ($ I = 0; $ I
Php-written class for filtering and retaining attributes
/**
@ Set and retain the attribute class
@ Class cleanHtml
@ Link: bbs.it-home.org
@ Date: 2013/2/28
*/
Function reg_escape ($
DATE_FORMAT, FROM_UNIXTIME, UNIX_TIME
DATE_FORMAT (NOW (), '% B % d % Y % h: % I % p ')
DATE_FORMAT (NOW (), '% m-% d-% Y ')
DATE_FORMAT (NOW (), '% d % B % Y ')
DATE_FORMAT (NOW (), '% d % B % Y % T: % f ')
Phpsession verification code inconsistency Total Display last verification code solution
$ (". Login"). live ('click', function (){
Var username = $ (". input_user"). val ();
Var password = $ (". input_ps").
Php function for converting RMB into uppercase Chinese
/**
Convert RMB amount to Chinese capital
Link: bbs.it-home.org
Date: 2013-2-28
*/
Function cny ($ ns ){
Static $ cnums =
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