浏览代码

更新 'application/common.php'

Me 5 年之前
父节点
当前提交
277ae4f6d1
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      application/common.php

+ 8 - 0
application/common.php

@@ -129,6 +129,14 @@ function authcode($str) {
     $str = substr(md5($str), 8, 10);
     return md5($key . $str);
 }
+
+/**
+ * @param $times:设置一个过期时间(60:代表1分钟,259220:代表3天(60(秒)*60(分)*24(小时)=1天),以此换算)
+ */
+function timeout($times){
+    $tuot = time()+$times;
+    session('tuot',$tuot);
+}
 //---------------------------------------------------------end