wzh 5 rokov pred
rodič
commit
7efda6b9f0
1 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 3 3
      api/application/controllers/User.php

+ 3 - 3
api/application/controllers/User.php

@@ -385,9 +385,9 @@ class User extends Base_Controller{
         $path = '../upload/image';
         $config['file_name'] = md5(uniqid());   // 设置图片名字
        
-        if (!file_exists($path)) {
-            mkdir($path);
-        }
+        if (!file_exists('../upload')) mkdir('../upload');
+        if (!file_exists('../upload/image')) mkdir('../upload/image');
+
         $config['upload_path']      = $path.'/';   // 设置图片上传路径
         $config['allowed_types']    = '*';  // 设置图片上传格式
         $config['max_size']     = 10240;   // 设置文件上传大小