This code will upload the file to the specified folder in Google Drive. The $folder_id` is the ID of the folder you want to upload to. You can get this ID from the URL when you open the folder in Google Drive.
Please note that this is a basic example and doesn't include error handling and other important aspects of a production-ready code, such as refreshing the access token when it expires. You should add those parts according to your needs.