google index api integration |
Hi everyone, I am trying to integrate the google api to Codeigniter 3.x but I cannot solve the problems.
I have a copy of google / apiclient in the libraries folder I have a file called google.php in the libraries folder I have a controller called Google in the controllers folder libraries/google.php PHP Code: <?php Controllers/Google.php PHP Code: <?php defined('BASEPATH') or exit('No direct script access allowed'); The problem I have is that when entering the browser the Google controller gives me the error: "Unable to locate the specified class: Session.php" How can I solve this error? Is there a library to use google?
You are loading it incorrectly:
https://github.com/googleapis/google-api...he-release Personally I would go with the composer package: https://github.com/googleapis/google-api...t#composer As CI 3.x supports it and you don't need to make a CI3 library. You should however make a library that generates all the data and just pass it to your controller so you can display it. https://codeigniter.com/userguide3/gener...t=composer (05-08-2020, 12:46 PM)jreklund Wrote: You are loading it incorrectly: thanks, you helped me a lot. I was already able to solve my problem.
Do you mind sharing the code that worked, as it will help other forum members.
y change the code a little bit
this is my indexing model PHP Code: <?php if (! defined('BASEPATH')) { and this is the code i added in my controller PHP Code: $this->load->model('Indexing'); |
Welcome Guest, Not a member yet? Register Sign In |