0
請幫忙。我得到這個錯誤:preg_match錯誤和調試php代碼
(!) Warning: preg_match(): Unknown modifier 'b' in C:\wamp\www\pmd\install\ioncube_checker.php on line 22
當我運行下面的代碼:
function system_info($php_info) {
$server_info = array();
$server_info['thread_safe'] = 'false';
$server_info['debug_build'] = 'false';
$server_info['php_ini_path'] = '';
foreach (explode("\n",$php_info) as $line) {
if (preg_match('/command/',$line)) {
continue;
}
if (preg_match('/thread safety.*(enabled|yes)/Ui',$line)) {
$server_info['thread_safe'] = 'true';
}
if (preg_match('/debug.*(enabled|yes)/Ui',$line)) {
$server_info['debug_build'] = 'true';
}
if (preg_match("/configuration file.*(</b></td><TD ALIGN=\"left\">| => |v\">)([^ <]*)(.*</td>*)?/",$line,$match)) {
$server_info['php_ini_path'] = $match[2];
if ([email protected]_exists($php_ini_path)) {
$server_info['php_ini_path'] = '';
}
}
$cgi_cli = ((strpos(php_sapi_name(),'cgi') !== false) || (strpos(php_sapi_name(),'cli') !== false));
$cgi_cli ? $server_info['cgi_cli'] = 'true' : $server_info['cgi_cli'] = 'false';
}
return $server_info;
}