php中表单印证 == 与===

WBOY
Release: 2016-06-13 12:38:31
Original
911 people have browsed it

php中表单验证 == 与===
 各位有没有出现过===可以通过,==反而出现错误的情况?

if (empty($password) || empty($cpassword)) {
die ("No password Submitted");
}
elseif ((strlen($password)15)) {
die("Invalid password length address");
}
elseif (!(strlen(password) == (strlen(cpassword)))) {
die("Passwords do not match!!!");
}
elseif (!(password)===(cpassword)) {
die("Passwords do not match!");
}
else{
for ($i=0; $i  echo "*";
}
}
?>

为什么我的密码在==判断时出现错误,删除掉这个判断,却可以通过?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template