PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, February 22, 2022

[FIXED] Use Google PHP API without including whole package

 February 22, 2022     composer-php, google-api-php-client, php     No comments   

Issue

I want to be able to use the Google API with PHP, but I don't want to have to include all 23MB and 8,000+ files. I only really need the Sheets and Drive functionality (for now), but autoload seems to insist I include everything.

Because of what I'm using it for, running Composer I think isn't feasible and I've never managed to get composer working with XAMPP anyway.

Help appreciated.


Solution

Check your directory structure you should have something like "Google/Service" look inside. There is a class for each of the Google APIs. Unless you are using every single one of the Google APIs you dont need all of these files. You can remove all but the one API you are going to be using.

That is the extent of what files you can safely remove everything else is needed.



Answered By - DaImTo
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing