chore(src): 针对上传权限,提供更多有价值的信息
This commit is contained in:
@@ -890,11 +890,13 @@ class Upload extends BaseModel
|
|||||||
*/
|
*/
|
||||||
public function checkPath($path)
|
public function checkPath($path)
|
||||||
{
|
{
|
||||||
if (file_exists($path) || mkdir($path, 0755, true)) {
|
try {
|
||||||
return $this->success();
|
if (file_exists($path) || mkdir($path, 0755, true)) {
|
||||||
|
return $this->success();
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $this->error('', "上传目录 {$path} 创建失败,请检测权限:" . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->error('', "上传目录 {$path} 创建失败,请检测权限");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user