Tag: eregi

函数eregi()已被弃用

函数eregi()已被弃用。 我怎样才能取代eregi()。 我尝试preg_match,但后来停止工作。 我们ethis帮助: http://takien.com/513/how-to-fix-function-eregi-is-deprecated-in-php-5-3-0.php 代码之前: if ( ! eregi("convert$", $this->library_path)) { if ( ! eregi("/$", $this->library_path)) $this->library_path .= "/"; $this->library_path .= 'convert'; } if (eregi("gd2$", $protocol)) { $protocol = 'image_process_gd'; } 代码然后: if ( ! preg_match("convert$/i", $this->library_path)) { if ( ! preg_match("/$/i", $this->library_path)) $this->library_path .= "/"; $this->library_path .= 'convert'; } if (preg_match("gd2$/i", $protocol)) { […]