2016-05-30 142 views

回答

1

添加父母参数Google_Service_Drive_DriveFile object。

$folderId = 'drive folder(summary) id'; 
$folderInfo = new Google_Service_Drive_DriveFile(array(
     'name' => 'january', 
     'mimeType' => 'application/vnd.google-apps.folder', 
     'parents' => array($folderId) //to create sub dir. under summary folder 
)); 
$file = $driveService->files->create($fileMetadata, array('fields' => 'id')); 
+0

$ fileMetadata应该是$ folderInfo。 仍然不适合我,但谢谢。谷歌开始惹我生气! – James

相关问题