Using autoload php

540 views
Skip to first unread message

sampath rathnayake

unread,
Sep 26, 2019, 9:46:13 AM9/26/19
to Google App Engine
Hi All,

I'm new to app engine and trying create a app from a sample code.
Can anyone please tell me what is the use of 

require_once __DIR__ . '/vendor/autoload.php';

Is this set of libraries we need to download? 
I'm developing/test locally and deploying in to gcloud project using 'gcloud app deploy'

I can use 
use google\appengine\api\users\User;

but I cannot use
use google\cloud\storage\StorageClient;

Fatal error: Class 'google\cloud\storage\StorageClient' not found in C:\Users..

Is there a component to install for cloud storage?

Thanks

sampath rathnayake

unread,
Sep 26, 2019, 9:46:13 AM9/26/19
to Google App Engine

sampath rathnayake

unread,
Sep 26, 2019, 9:46:14 AM9/26/19
to Google App Engine

Mua Rachmann

unread,
Sep 26, 2019, 1:46:53 PM9/26/19
to google-a...@googlegroups.com
You will need to import it in the file, smart IDE's like phpstorm, vscode can do that once you start typing.
Also ensure you have the dependency in your composer.json  file "google/cloud-storage" or other libraries that have the storage
cloud stuff.

Hope it helps.

Mua

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/a60c5004-7fc4-4cf3-8d6d-bbad3a073cc1%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages