在空MX/Modules.php行号:8 ckeditor和kcfinder上调用成员函数item() [英] Call to a member function item() on null MX/Modules.php Line Number: 8 ckeditor and kcfinder

查看:130
本文介绍了在空MX/Modules.php行号:8 ckeditor和kcfinder上调用成员函数item()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对codeigniter中的ckeditor和kcfinder有麻烦,我使用了HMVC 线材设计 codeigniter-modular-extensions-hmvc,当我要浏览这样的图像错误

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

遇到PHP错误

严重性:错误

消息:调用成员函数item()为空

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

文件名:MX/Modules.php

Filename: MX/Modules.php

行号:8

回溯:

当我不使用HMVC来访问ckeditor并从kcfinder浏览图像时,它是好的,而当使用HMVC时是麻烦.我已经在这个stackoverflow和google中搜索了引用,但是与我的麻烦不一样.我已经在application/config.php

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/',
);

和根文件夹中的configurasi文件索引

and configurasi file index in root folder

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

并且我使用我在文件夹asset/kcfinder/conf/config.php中设置的会话

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;
}

推荐答案

出现此错误的原因是,在此文件的开头有全局变量 您可以做到

That error appeared cause there is the global var, at the beginning, this file You can do this

Modules::$locations = array(
    APPPATH.'modules/' => '../modules/',
);

代替

is_array(Modules::$locations = $CFG->item('modules_locations')) OR 
Modules::$locations = array(
    APPPATH.'modules/' => '../modules/',
);

这篇关于在空MX/Modules.php行号:8 ckeditor和kcfinder上调用成员函数item()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆