PHP filter English punctuation marks to filter Chinese punctuation code
Copy Code code as follows:
function Filter_mark ($text) {
if (Trim ($text) = = ') return ';
$text =preg_replace ("/[[:p unct:]\s]/", "", $text);
$text
How does php filter out the V11 from smart ABC? this space cannot be recognized. ctype_space and preg_replace ('/\ s +/', '', $ nick) = ''is not supported, that is, all blank spaces cannot be written to the database.
Reply to discussion
PHP filter form submits special characters (anti-injection ). This article will summarize some common methods for preventing php injection and SQL injection in php, htmlspecialcharsaddslashesstripslashesstrip_tagsmysql_re is provided in php. This
This article mainly introduces the web security anti-SQL injection is a multi-filter with PHP filter function, has a certain reference value, now share to everyone, the need for friends can refer to
SQL injection and cross-site attack filtering
We all know that.Example code for PHP filtering strings:
? PHP
NL2BR ();
//N to br/>
Addslashes (); Stripslashes ();
Escape special characters when working against a database
Chop ();
Remove the right space from the string
PHP --- filter arrays using callback functions & lt; div & gt; & lt ;? Php returns functionodd ($ var) {return ($ var % 21) if it is an odd number;} returns functioneven ($ var) if it is an even number) {return ($ var % 20);} $ nums1 PHP --- use the
Remember the data from other Web sites that were crawled to XML in the past at work. However, there is a problem: The Web page will have ASCII control characters. At first I thought it was someone else who joined in order to prevent the collection,
PHP filters are used to validate and filter data from non-secure sources, such as user input.The filter function is part of the PHP core. These functions can be used without installation.Filter_callback invokes a user-defined function to filter the
How does PHP filter the GET or post parameters? How can I ensure that the code is not injected?
How does PHP filter the GET or post parameters? Prevent JS injection, or some HTML injection? Please provide code reference? Thank you!
------Solution---
The easiest way to filter links is to use the Strip_tags function of the PHP tutorial, as follows
PHP Filter HTML function: Strip_tags (string) so that you can filter out all the HTML tags.If you want to filter out all HTML tags except the , you
Learning and understanding of PHP input/output streams php: //-accessing various input/output streams (I/Ostreams) PHP provides some miscellaneous input/output (IO) stream, which allows access to PHP input and output streams, standard input and
Drupal 7.31 SQL injection vulnerability exploitation and EXP, drupal7.31Zookeeper
This article and program will be published a few days later. However, it seems that the Drupal hole has not attracted much attention, so I do not have to pay attention
PHP: filter php: // filter is an encapsulation protocol designed to allow a filter program to flow when it is opened. This is useful for file functions with complete functions such as readfile (), file (), and file_get_contents (). Otherwise, you
This article is mainly to share with you in PHP filter protocol detailed, hope to help everyone.
php://-access to each input/output stream (I/O streams) php://input is a read-only stream that can access the raw data of the request. Php://filter is
The following is a summary of common form special character processing:
Test string:
The code is as follows
Copy Code
$dbstr = ' D:testHTTP://WWW.111CN.NET, Tian Yuan Blog'!= ' 1 ' OR ' 1 'php OUTPUT";?> ';
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.