googleworkspace / php-samples

PHP samples for Google Workspace APIs
Apache License 2.0
288 stars 348 forks source link

quickstart.php #25

Closed kuroneko19810604 closed 5 years ago

kuroneko19810604 commented 5 years ago

Based on the site of https://qiita.com/wtanabe/items/ead266f065bdcb14a0c6 I created quickstart.php, but without the 14th line of Google_Client class I get an error, I am in trouble.

kuroneko19810604 commented 5 years ago

312/5000 I am testing with Xampp, The following error sentence is dispatched.

This application must be run on the command line. Fatal error: Uncaught Error: Class 'Google_Client' not found in C: \ xampp \ htdocs \ Twitter \ text.php: 14 Stack trace: # 0 C: \ xampp \ htdocs \ Twitter \ text.php (60): getClient ) # 1 {main} thrown in C: \ xampp \ htdocs \ Twitter \ text.php on line 14

TheJadeEmperor commented 5 years ago

Same here

kuroneko19810604 commented 5 years ago

In my case, the source of Quickstart in the gmail part of the essence Because it was missing, in a different folder composer require google / apiclient: ^ 2.0 After you ran it, you got the necessary parts.

grant commented 5 years ago

As the instructions state, the app is intended to be run from the command line: https://developers.google.com/sheets/api/quickstart/php#notes