[SOLVED] How can I call a Google Application using CI4 |
I have developed a couple of PHP online websites using Google Books API and struggling to get the API to work with CI4.
With PHP I use Composer to download the API then the following couple of lines and it works a treat: Code: require_once '/var/www/ci2/vendor/autoload.php';
Did you add a use path\Google_Client ?
Also you may need a backslash \Google_Client(); What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
@InsiteFX,
> Did you add a use path\Google_Client ? Using require_once '/var/www/ci2/vendor/autoload.php'; worked. I could not set namespace and/or use? > Also you may need a backslash \Google_Client(); Many thanks the problem was the missing leading backslash. I've experienced the same problem earlier (since using CI4 namespaces) and had forgotten |
Welcome Guest, Not a member yet? Register Sign In |