dsy48837 2016-10-01 09:20
浏览 47
已采纳

加载第三方库时找不到会话类

I am trying to use a third party library for openfire in my Codeigniter Application.

So I have put the libarary in third party folder, and have created an index.php file where I configure my Library.

Then I created a class file in library folder called index.php and I call the third party library like this:

<?php defined('BASEPATH') OR exit('No direct script access allowed');


class Open extends MY_Controller
{


public function __construct()
{
    parent::__construct();
}



public function index()
{
    require_once APPPATH.'third_party/openfire/index.php';
}

}

Finally created a controller called user.php and tried to load this libaray using :

$this->load->library('Open');

But on screen this shows me error:

Unable to locate the specified class: Session.php

Its an unexpected error! what can be the possible reasons for this ? If i stop load this library everything works fine.

And I have already loaded Session in autload.php

  • 写回答

1条回答 默认 最新

  • dongqiao3927 2016-10-01 10:31
    关注

    class Open extends MY_Controller

    Try not extending the MY_Controller

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题