About PHP filtering illegal characters
SQL statement check-in error, filter out the '% ', see online has this mysql_real_escape_string function, I use after return empty, do not know what reason? Are there any useful PHP filter character functions?
1 Find the character position function:Strpos ($str, Search,[int]): Find the first position of search in $str starting with int;Stripos ($str, search,[int]): function returns the position of the first occurrence of a string in another string. This
Reference article:Http://www.ruanyifeng.com/blog/2014/12/unicode.htmlUnicode comes from a very simple idea: to include all the characters of the world in a single set, the computer can display all the characters as long as it supports this character
Last month, I did a share, detailing the Unicode character set and the JavaScript language support for it. Here is the transcript of this share.
First, what is Unicode?Unicode comes from a very simple idea: to include all the characters of the
1. Character functionsCONCAT () connection characterMysql> Select Concat (' A ', ' B ', ' C '); +---------------------+| Concat (' A ', ' B ', ' C ') |+---------------------+Concat_ws () connects with the specified delimiterMysql> Select Concat_ws ('
This article mainly introduces the C language efficient programming skills, this article explains the space for time, mathematical methods to solve problems and use bit operation, such as editing skills, and give a number of methods and code
The explode () function can be used to split character functions in PHP, but there must be a rule for using this function, such as separating the | or by other characters, so that we can use the explode to divide the string into an array and then
1 Find character position function:
Strpos ($str, Search,[int]): Find the first position of search in $str starting from int;
Stripos ($str, search,[int]): function returns the position where the string first appears in another string. This function
numeric function:
Absolute value of ABS (m) m
MoD (M,n) m is the remainder after the n is removed
Power (M,n) m's n-th-side
Round (M[,n]) m rounded to n digits after the decimal point (n defaults to 0)
Trunc (M[,n]) m truncates the value of
Calling code
Js_bbs.php (put in root directory) content
Require ("bbs/config.inc.php");
Connect, select Database
$link = mysql_connect ($dbhost, $dbuser, $DBPW) or die (' could not connect: '. Mysql_error ());
mysql_select_db ($dbname) or die
Many developers write object-oriented applications, creating a PHP source file for each class definition. A big annoyance is having to write a long list of included files at the beginning of each script (one file per class).
In a software
In Oracle functions in addition to character functions, date functions, mathematical functions, and conversion functions, and so on, there are some functions are common functions, such as: NVL, NVL2, Nullif, coalesce.Let's take a look at their usage:
The occasional encounter in the work of the need to convert the amount of renminbi, that is, Arabic numerals into uppercase characters, the following is the author's practice summed up the method, and hereby record to prevent the memo.
Class
2. ctype.h
The character class header file is used to test characters and convert characters. A control character that references another character that is not part of a printable character set. In the ASCII character set, all characters 0x0 to
When I develop the ASP + Access Web application, I will encounter the problem of locating the path of the database file. When implemented on your own computer, you can specify the event directly. But if you do the project to upload to other servers
Query: Field Select field 1, Field 2, Field 3 from table name where condition"+" sign: Only for numeric calculations select 1+2 or select 1+ ' 2 '"CONCAT": Used for connection string CONCAT (character 1, character 2), such as a select CONCAT (12)
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.