[eluser]Unknown[/eluser]
Hi guys,
I've been using CI for a while but still have some difficulties from time to time, but this time I can't really figure it out.
I'm trying to get Elfinder (file manager) to work with Codeigniter and I've done the following.
File manager controller (controllers/documents)
Code:
/* inline scripts related to this page */
$this->load->view('_inline_scripts/_documents');
File manager jquery script (views/_inline_scripts/_documents)
Code:
[removed]
$().ready(function(){
var elf = $('#elfinder').elfinder({
url : '<?php echo base_url(). "application/controllers/ex_cont/elfinder_init" ?>',
rememberLastDir : true,
lang : 'sv',
height : '600'
}).elfinder('instance');
});
[removed]
File manager controller (controllers/ex_cont/elfinder_init)
Code:
<?php
function elfinder_init()
{
$this->load->helper('path');
$opts = array(
// 'debug' => true,
'roots' => array(
array(
'driver' => 'LocalFileSystem',
'path' => set_realpath('filesystem'),
'URL' => site_url('filesystem') . '/'
// more elFinder options here
)
)
);
$this->load->library('elfinder_lib', $opts);
}
File manager library (lib/Elfinder_lib)
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elfinder/elFinderConnector.class.php';
include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elfinder/elFinder.class.php';
include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elfinder/elFinderVolumeDriver.class.php';
include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elfinder/elFinderVolumeLocalFileSystem.class.php';
class Elfinder_lib
{
public function __construct($opts)
{
$connector = new elFinderConnector(new elFinder($opts));
$connector->run();
}
}
And the error I get is:
Can't connect to back-end
Permissions denied
And if I check firebug I get the following:
Quote:http://localhost/NovaCloud/application/c...7590387888
Quote:<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /NovaCloud/application/controllers/ex_cont/elfinder_init
on this server.</p>
</body></html>
Any ideas how to fix this? I guess it has something to do with my rewrite rules?
Thanks in advance!