[英]CKFinder modal opens homepage and does not show files
I am using CKFinder in a CodeIgniter project and the problem I have is that when I click to open the modal to upload new media the modal shows the homepage of my project and not the files in the folder.我在 CodeIgniter 项目中使用 CKFinder,我遇到的问题是,当我单击打开模式以上传新媒体时,模式显示我的项目的主页,而不是文件夹中的文件。 I am rebuilding the project from another project, so in earlier stages, CKFinder was working well.
我正在从另一个项目重建项目,因此在早期阶段,CKFinder 运行良好。 Things I suspect caused the problem:
我怀疑导致问题的原因:
Useful information:有用的信息:
I have it configured that all users are allowed to use ckfinder but I am suspecting that this is maybe not working so when anyone calls to ckfinder redirects take place and the modal calls the homepage instead.我已将其配置为允许所有用户使用 ckfinder,但我怀疑这可能不起作用,因此当有人调用 ckfinder 重定向时,模态调用主页。
I found only one similar question asked here before but it was not answered (maybe the question did not have enough information).我发现之前这里只问过一个类似的问题,但没有得到回答(也许这个问题没有足够的信息)。 I would appreciate any assistance.
我将不胜感激任何帮助。
I found the problem.我发现了问题。 In order to use sessions in ckfinder config.php I used this:
为了在 ckfinder config.php 中使用会话,我使用了这个:
// Include the codeigniter framework
define("REQUEST", "external");
ob_start();
require('index.php');
ob_end_clean();
$CI =& get_instance();
$CI->load->library('session'); //if it's not autoloaded in your CI setup
This served me we when I first implemented in. But after reusing this ckfinder folder in another project with a few changes (see question) it started giving me problems.当我第一次实施时,这对我很有帮助。但是在另一个项目中重用这个 ckfinder 文件夹并进行了一些更改(见问题)之后,它开始给我带来问题。 The problem was solved when I removed that piece of code.
当我删除那段代码时,问题就解决了。 I'll have to figure out how to access session variables in another manner.
我必须弄清楚如何以另一种方式访问 session 变量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.