Browse Source

更新 'application/common.php'

Me 5 năm trước cách đây
mục cha
commit
277ae4f6d1
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  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