driver($dir); $this->makeDirectory($save_dir); $file->moveTo(sprintf('%s/%s', $save_dir, $filename)); if ($file->isMoved()) { // 修改文件权限 @chmod(sprintf('%s/%s', $save_dir, $filename), 0644); } return $file->isMoved() ? sprintf('/%s/%s', trim($dir, '/'), $filename) : false; } }