Jump to content

I could'nt clear this issue, can anyone help me Fatal error: Uncaught exception 'Google_Exception' with message 'Unknown functio n: ->->insert()'


manoswc

Recommended Posts

In drive.php

 

public function insert($postBody, $optParams = array())
  {
    $params = array('postBody' => $postBody);
    $params = array_merge($params, $optParams);
    return $this->call('insert', array($params), "Google_Service_Drive_DriveFile");
  }
  
In resource.php
 
public function call($name, $arguments, $expected_class = null)
  {
    if (! isset($this->methods[$name])) {
      throw new Google_Exception(
          "Unknown function: " .
          "{$this->serviceName}->{$this->resourceName}->{$name}()"
      );
    }
  

firstpro.php

Given your hand-coded error message, I'd venture a guess that neither resource.serviceName nor resource.resourceName are set, and resource::insert() doesn't exist in the $methods array.

 

Also, in the future please use the code tags (< > in the toolbar) when posting code as it does make it easier to read. Yours wasn't bad, but it's a good habit to get in to.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.