Home  >  Article  >  Backend Development  >  Analyze the matching meaning of this code of spinrtf function

Analyze the matching meaning of this code of spinrtf function

WBOY
WBOYOriginal
2016-08-18 09:15:581268browse

<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>

Reply content:

<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>

Just match the IP in the blacklist

Statement:
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