Rumah > Artikel > pembangunan bahagian belakang > 分析一下spinrtf函数这段代码的匹配含义
<code>$pattern = sprintf('/(?:,\s*|^)\%Qs\E(?=,\s*|$)/m', $this->input->ip_address()); // Returns 1, 0 or FALSE (on error only). Therefore implicitly convert 1 to TRUE if (preg_match($pattern, $this->config->item('rest_ip_blacklist')))</code>
<code>$pattern = sprintf('/(?:,\s*|^)\%Qs\E(?=,\s*|$)/m', $this->input->ip_address()); // Returns 1, 0 or FALSE (on error only). Therefore implicitly convert 1 to TRUE if (preg_match($pattern, $this->config->item('rest_ip_blacklist')))</code>
就是匹配黑名单中的IP