Codeigniter google-url-master library

爷,独闯天下 提交于 2019-12-12 03:29:42

问题


I am having trouble using this (https://github.com/gsouf/google-url) library as a codeigniter library.

I've downloaded the library from GitHub and placed it in this folder: application/libraries/google-url-master

And created this file to setup the library as a codeigniter library: libraries/googleurl.php

<?phpif (!defined('BASEPATH')) exit('No direct script access allowed');class GoogleUrl {

private $g;


function __construct() {
    require_once( APPPATH . 'third_party/google-url-master/autoload.php' );
    $this->g = new \GoogleUrl;

}

And then load if trough controller with this line: $this->load->library('googleurl');

But when I load the library it gives me this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65488 bytes) in \application\libraries\googleurl.php on line 11

Looks like its in a loop, but I cannot figure out why this is happening.

I thought/hoped the anser of antoni would help me out, but no success so far: How to Integrate SEOStats with Codeigniter?

Thanks in advance,

Martijn

来源:https://stackoverflow.com/questions/36530475/codeigniter-google-url-master-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!