?
Class useful{
/*
* Common function class
* Author: More than a rookie
* Contact Email: KINGERQ at MSN DOT com
* Date Created: 2005-07-18
* Source: Http://blog.csdn.net/kingerq
*/
/*
* Function: Format numbers, output in standard money
Alphaid (12354); //converts numbers to letters.
alphaid (' Ppqxn7cof ', true);//will convert the letter ID to the corresponding number.
Alphaid (12354,false,6);//Specifies that the length of the generated letter ID is 6.
Source:
The following is the code that implements the string substitution function in the C language:
Char *replace (char *source, Char *sub, char *rep){Char *result;/*PC1 is the scan pointer copied to result results./*PC2 is the auxiliary pointer to scan
Yesterday on Google to find PHP simplified, traditional interactive function.Reprinted articles are many, but the character chart is not down, can not be used.Helpless can only write their own, to share with people in need of it.Note that this is
Tonight, when writing a form validation class for a framework, you need to determine whether a string length is within a specified range, and naturally, think of the strlen function in PHP.
The code is as follows
$str =
Recently webmaster I also learn php, so tidy up some of the PHP development of small tips for everyone to learn.
0. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP searches for variables in a string
As with C, C + + uses Boolean expressions to simplify the evaluation (short-circuit evaluation). This means that once the true or False value of a Boolean expression is determined, even if some of the expressions are not tested, the Boolean
This is I accidentally attacked a website found a code PHP effectively intercepts my DDoS
Query prohibits IP
$ip =$_server[' remote_addr '];
$fileht = ". Htaccess2";
if (!file_exists ($fileht)) file_put_contents ($fileht, "");
$filehtarr = @file
Random
Generate a number of 6 ~ 16 user names, mainly text operations, the colleague premise is to have a string package. consists of three programs.Program one: Responsible for the random extraction of data from the dictionary, write a new file. (1.
The following example is the conversion of gb2312 to uft-8 this formphp4.3.1 later Iconv function is very useful, just need to write a uft8 to Unicode conversion functionTabular (gb2312.txt) is fine.
?$text = "electronic stacks";Preg_match_all
The example in this article describes the way PHP automatically gets keywords. Share to everyone for your reference.
The implementation methods are as follows:
The code is as follows: $mincipin =5;//minimum Word frequency
$minlen =4;//keyword
Client | network/*author:yekin-yu
date:10/30/2003
Principle and method of realizing automatic distribution system by using B/s network installation Client
This site works copyright author all, other websites or media such as to reprint please signed
The common functions for calculating string lengths in PHP are: strlen and Mb_strlen. When the word Fu Quan is an English character, the two are the same. Here the main comparison, in Chinese and English mixed row, two results.
In PHP, strlen and
Use of dynamic memory
Although the method in the previous section avoids overflow problems, but results in loss of data, let's learn a better way to use dynamic memory. Because dynamic memory is used entirely by the user, you need to use some
Counter now, more and more people surf the internet, many netizens try to make their own homepage, the visitor counter is an essential part. Although many sites provide free counters, but after all, not their own hands to make? Some friends may
Query system
A few days ago did a college English 46 grade query system, a PHPRPC version , a WAP version . Their core code is the same. Here is the core code for getting college English 46 grades from Etang.cet:Download:cetquery.php
function
About arrays:
Arrays in PHP are complex and are more flexible than arrays in many other high-level languages.An array of arrays is an ordered set of variables in which each variable is called an element.Arrays can be numbered or associated, that is,
This article is the PHP to do push service End-to-end implementation of the iOS message push method of a detailed analysis of the introduction, the need for friends under the reference
Preparatory work 1. Access to mobile phone registration
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