Browse Source

更新 'application/common.php'

Me 5 years ago
parent
commit
728bdc8523
1 changed files with 7 additions and 0 deletions
  1. 7 0
      application/common.php

+ 7 - 0
application/common.php

@@ -132,6 +132,13 @@ 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