douliao1911 2018-12-04 17:10
浏览 61

在null MX / Modules.php上调用成员函数item()行号:8 ckeditor和kcfinder

I have trouble about ckeditor and kcfinder in codeigniter, i used HMVC from wiredesignz codeigniter-modular-extensions-hmvc, when i want to browse images error like this

Fatal error: Call to a member function item() on null in C:\xampp\htdocs\mypro\abbas_eterna\application\third_party\MX\Modules.php on line 8

A PHP Error was encountered

Severity: Error

Message: Call to a member function item() on null

Filename: MX/Modules.php

Line Number: 8

Backtrace:

When i do not use HMVC to access ckeditor and browse image from kcfinder is good, and when use HMVC is trouble. I already search reference in this stackoverflow and google but not same trouble with me. i already declare in application/config.php

    $config['modules_locations'] = array(
    APPPATH.'modules/' => '../modules/',
);

and configurasi file index in root folder

$system_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'system';
$application_folder = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'application';

and i use session that i setting in folder asset/kcfinder/conf/config.php

ob_start();
include('./../../index.php');
ob_end_clean();
$CI =& get_instance();
$CI->load->driver('session');
if(@$_SESSION['upload_image_file_manager'] == TRUE){
    $codeigniterAuth = false;
} else {
    $codeigniterAuth = true;
}
  • 写回答

1条回答 默认 最新

  • duande9301 2018-12-05 01:41
    关注
    <?php (defined('BASEPATH')) OR exit('No direct script access allowed');
    
    (defined('EXT')) OR define('EXT', '.php');
    
    global $CFG;
    
    /* get module locations from config settings or use the default module location and offset */
    is_array(Modules::$locations = $CFG->item('modules_locations')) OR Modules::$locations = array(
        APPPATH.'modules/' => '../modules/',
    );
    
    /* PHP5 spl_autoload */
    spl_autoload_register('Modules::autoload');
    
    评论

报告相同问题?

悬赏问题

  • ¥15 在获取boss直聘的聊天的时候只能获取到前40条聊天数据
  • ¥20 关于URL获取的参数,无法执行二选一查询
  • ¥15 液位控制,当液位超过高限时常开触点59闭合,直到液位低于低限时,断开
  • ¥15 marlin编译错误,如何解决?
  • ¥15 有偿四位数,节约算法和扫描算法
  • ¥15 VUE项目怎么运行,系统打不开
  • ¥50 pointpillars等目标检测算法怎么融合注意力机制
  • ¥20 Vs code Mac系统 PHP Debug调试环境配置
  • ¥60 大一项目课,微信小程序
  • ¥15 求视频摘要youtube和ovp数据集