|
@@ -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; // 设置文件上传大小
|