【发布时间】:2015-03-23 22:14:03
【问题描述】:
首先我将 Google 文件夹复制到 codeigniter 框架中的 application/third_party。
然后是应用程序/库中的 google.php
<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
set_include_path(APPPATH . 'third_party/' . PATH_SEPARATOR . get_include_path());
require_once APPPATH . 'third_party/Google/Client.php';
class Google extends Google_Client {
function __construct($params = array()) {
parent::__construct();
}
}
然后我创建了一个名为 googleClass.php 的控制器
<?php
class GoogleClass extends CI_Controller {
function __construct($params = array()) {
parent::__construct();
}
public function index(){
$this->load->library('google');
echo $this->google->getLibraryVersion();
}
}
但我收到以下错误...
Fatal error: require_once(): Failed opening required '' (include_path='application/third_party/;.;C:\xampp\php\pear') in C:\xampp\htdocs\csvinsert\application\third_party\Google\Client.php on line 18
我做错了什么??
【问题讨论】:
标签: php codeigniter google-api-php-client