コード例 #1
0
ファイル: SessionTool.class.php プロジェクト: dower-d/shop
 /**
  * 实例化数据库对象,连接数据库,完成基本设置
  */
 public static function sess_open()
 {
     $setting = $GLOBALS['config']['session'];
     self::$table_name = $GLOBALS['config']['session']['table_name'];
     if (isset($setting['type']) && $setting['type'] == 'mysql') {
         self::$db = MysqlDb::getInstance($setting);
     } else {
         self::$db = PDOMysql::getInstance($setting);
     }
 }
コード例 #2
0
ファイル: PDOMysql.php プロジェクト: henrylin2015/www
 /**
  * 設置是否为调试模式
  */
 public function setDebugMode($mode = true)
 {
     return $mode == true ? self::$debug = true : (self::$debug = false);
 }