/** * 获取一个表的表名 * @param $table_name 不带前缀的表名 * @return string 返回带前缀的表名 */ public static function table($table_name) { return TsConfig::get('DB_PREFIX') . $table_name; }
public static function desDecrypt($string, $key = null) { if ($key === null) { $key = \Config\Thinksns::get('SECURE_CODE', ''); } $des = new \Lib\TsDesMobile(); return $des->setKey($key)->decrypt($string); }