如何使用php获取在google drive SDK中上传的文件URL

I am using Google Drive SDK to upload files by PHP. now I want to get the Link as string so that I can store it in my Database. But I don't have any idea on how to get it.. this is the code in creating the file in google drive using PHP.

$file = new Google_DriveFile();
$file->setTitle( 'new_pdf' );
$file->setMimeType( 'application/pdf' );
$createdFile = $service->files->insert( $file, array(
    'data' => $stringContent,
));

You want one of the properties of $createdFile.

The list of properties is at https://developers.google.com/drive/v2/reference/files

You probably want webContentLink, but it depends on how it is you intend to use the URL.