我将DLE 10.6转移到PHP 7,我看到一个空白页面。在调试期间,我发现如果我从main.tpl网站上删除[not-aviable = smth] smth [/ not-aviable]开始工作。好的,我在templates.class.php方法中找到了check_module:
function check_module($matches) {
global $dle_module;
$regex = '/\[(aviable|available|not-aviable|not-available)=(.+?)\]((?>(?R)|.)*?)\[\/\1\]/is';
if (is_array($matches)) {
$aviable = $matches[2];
$block = $matches[3];
if ($matches[1] == "aviable" OR $matches[1] == "available") $action = true; else $action = false;
$aviable = explode( '|', $aviable );
if( $action ) {
if( ! (in_array( $dle_module, $aviable )) and ($aviable[0] != "global") ) $matches = '';
else $matches = $block;
} else {
if( (in_array( $dle_module, $aviable )) ) $matches = '';
else $matches = $block;
}
}
return preg_replace_callback($regex, array( &$this, 'check_module'), $matches);
}
当我删除" not-aviable:从$ regex网站开始workinig。 php.ini包含pcre.backtrack_limit = 1000000