ecshop php7

2016-05-30 20:54:17 0  category: 第一阶段PHP

ecshop支持php7  ecshop升级php7

62491464612310.png


cls_template.php


第 300 行


# return preg_replace("/{([^\}\{\n]*)}/e",  "\$this->select('\\1');", $source);
return preg_replace_callback("/{([^\}\{\n]*)}/",
function($r){
return $this->select($r[1]);
}
, $source);


第 495 行



#$out = "<?php \n" . '$k = ' . preg_replace("/(\'\\$[^,]+)/e" , "stripslashes(trim('\\1','\''));", var_export($t, true)) . ";\n";
$out = "<?php \n" . '$k = ' . preg_replace_callback("/(\'\\$[^,]+)/" , function($r) {
return stripslashes(trim($r[1],'\''));
} , var_export($t, true)) . ";\n";

第 558 行



# $val = preg_replace("/\[([^\[\]]*)\]/eis", "'.'.str_replace('$','\$','\\1')", $val);
$val = preg_replace_callback("/\[([^\[\]]*)\]/is", function($r){
return '.'.$r[1];
}
, $val);



第 1080 行


#$source      = preg_replace($pattern, $replacement, $source);
$source = preg_replace_callback($pattern, function($r){
return '{include file='.strtolower($r[1]). '}';
}, $source);



cls_mysql.php


第 21 行

require __DIR__ . '/mysql.php7.php';

第 125 行


/* 如果mysql 版本是 4.1+ 以上,需要对字符集进行初始化 */
mysql_set_charset($charset, $this->link_id);
mysql_select_db($dbname, $this->link_id);
$this->version = mysql_get_server_info($this->link_id);



icon_rar.gifecshop.php7.zip