深圳全飞鸿

标题: 关于osbg的系统更新 [打印本页]

作者: zhgc    时间: 2019-9-26 14:17
标题: 关于osbg的系统更新
本帖最后由 zhgc 于 2019-9-26 14:25 编辑

1. 首先(安装之前)把config.inc.php中的数据库改为mysqli了
var $db_type = "mysqli";


2. 改template.inc.php中的split()
直接用explode取代了split

3. 改functions.inc.php,添加
  1. ...
  2.     return $password;
  3. }

  4. if (!function_exists('session_unregister')){
  5.      function session_unregister($var) {
  6.         //如果是array,是否需要先$_SESSION[$var]=array()以释放内存?
  7.         unset($_SESSION[$var]);
  8.     }
  9. };
  10.   

  11. // 数据预处理
  12. if (get_magic_quotes_gpc())
  13. ...
复制代码


4. preg_replace(): The /e modifier is deprecated
return preg_replace("/{([^\}\{\n]*)}/e", "\$this->select('\\1');", $source);

替换为

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


作者: zhgc    时间: 2019-9-26 21:25
5. 关于smarty的升级

lib及mi.smarty.php全部覆盖

引用部分不再需要设置

  1.         include_once("libs/mi.smarty.php");
  2.         $smarty = new MySmarty();
  3.         //$smarty->setTemplate($config->dir_template);
  4.         //$smarty->setCache("caches");
  5.         //$smarty->setPlugin("../../plugins");
复制代码









欢迎光临 深圳全飞鸿 (http://www.nagomes.com/disc/) Powered by Discuz! X3.2