Ideas:First, the key words written in a text file, each line one, the number of unlimited, how many write.Second, PHP read the keyword text, stored in an arrayThree, traverse the key word group, each use Strpos function to see the content has no
The following code is saved as a MD5Crypt.class.php file
The code is as follows
Copy Code
Class Md5crypt {/*** Enter description here ...* @param unknown_type $str* @return String*/Public final static function Mdsha ($STR)
The code is as follows
Copy Code
/** Created on 2011-3-11* Programmer:xiaoyao, qq:1045195056Validation by judging input values and $_session[' check_pic ' values*/Session_Start ();function Randascii ($number) {//$number produces
PHP's HTTP authentication mechanism works only when PHP is running in Apache mode, so this feature does not apply to CGI versions. In the Apache module's PHP script, you can use the header () function to send "authentication Required" information to
1, delete HTML annotation;2, delete script, link, object, embed, IFRAME, frame, frameset and have on the beginning, including Web page effects: [^;] or expression the label of the attribute;3, delete the annotations in the CSS tutorial (prevent this
As we all know, all the library names are stored in the INFORMATION_SCHEMA library in the MySQL 5+, indicating the field name information. So the attack mode is as follows:
1. Determine whether the first character of the first table name is a A-Z
Generally, for the incoming characters, PHP can be processed with the Addslashes function (to GET_MAGIC_QUOTES_GPC () to deal with the false, or repeat the escape! ), so as to achieve a certain level of security requirementsLike this.
Example 1
The code is as follows
Copy Code
function uhtml ($STR){$farr = Array ("/s+/",//filter Excess blankFiltering etc. may introduce malicious content or maliciously change the display layout of the code, if you
For most cryptographic cryptography, we can use MD5, SHA1 and other methods. Can effectively prevent data disclosure, but these methods apply only to data encryption that does not need to be restored.
For information that needs to be restored, a
Recently bored nothing to do, began to do some of the sharing of PHP, the code is relatively simple, but more practical.
This is written four years ago, a few lines of code to achieve four-bit random number of PHP verification code function.
------The PHP language is similar to the way JavaScript is used--js with PHP is a weakly typed language weakly typed language just does not display the performance definition variable when the system automatically gives defaultSo you can define
Use Nginx in windows to replace apache as the server, nginxapache
To be honest, using Nginx in windows is a little inconvenient, but due to project requirements, you don't want to change the system (although you can have a virtual machine), you can
PHP Regular Expression matching instance code of date and time (timestamp conversion), php instance
Let's start with a simple and practical code.
Date YYYY-MM-DD
$str = '';$isMatched = preg_match('/^\d{4}(\-|\/|.)\d{1,2}\1\d{1,2}$/', $str, $matches);
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