有线问题,但我想知道=~
和==
关注“字符串”我试图找到。
if($ua =~ "friendly-scanner") {
drop()
}
Vs的
if($ua == "friendly-scanner") {
drop()
}
答案 0 :(得分:1)
=~ - Does a regular expression matching
== - Compares two for equality
例如:
if($ua =~ "^friendly") is "$ua begins with friendly"
if($ua == "friendly") is "$ua exact match with friendly"