原理:SQL语句sql="select * from user where username='"&username&"'and password='"& password&'",当我们的密码填写'or'1'='1提交的时候,此时语句中的password等于'or'1'='1,那么,这条SQL语句就变成了:sql="select * from user where username='"&username&"'and password= ''or'1'='1',然而,1=1是恒等条件,自然也就通过了程序的验证。