我正在尝试使用Google Drive API在PHP中创建一个文件夹。但是,当我创建它时,它只是创建一个没有扩展名的空文件。这是我的代码:
$user_folder = new \Google_Service_Drive_DriveFile();
$user_folder->setTitle("FOLDER_NAME");
$user_folder_parent = new \Google_Service_Drive_ParentReference();
$user_folder_parent->setId("PARENT_FOLDER_ID");
$user_folder->setParents([$user_folder_parent]);
$user_folder_upload = $this->drive_instance->files->insert($user_folder, [
'mimeType' => 'application/vnd.google-apps.folder'
]);
据我所知,这很好,但仍然没有用。我该如何解决这个问题?
由于