Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript elFinder connector.php->;Internet Explorer中的路径_Javascript_Php_Jquery_Ajax_Elfinder - Fatal编程技术网

Javascript elFinder connector.php->;Internet Explorer中的路径

Javascript elFinder connector.php->;Internet Explorer中的路径,javascript,php,jquery,ajax,elfinder,Javascript,Php,Jquery,Ajax,Elfinder,我在connector.php中动态设置path,它在除Internet Explorer之外的所有浏览器中都能正常工作。以下是我的connector.php代码: function access($attr, $path, $data, $volume) { return strpos(basename($path), '.') === 0 // if file/folder begins with '.' (dot) ? !($attr == 'read'

我在connector.php中动态设置path,它在除Internet Explorer之外的所有浏览器中都能正常工作。以下是我的connector.php代码:

function access($attr, $path, $data, $volume) {
    return strpos(basename($path), '.') === 0       // if file/folder begins with '.' (dot)
        ? !($attr == 'read' || $attr == 'write')    // set read+write to false, other (locked+hidden) set to true
        :  null;                                    // else elFinder decide it itself
}


// Documentation for connector options:
// https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options
$opts = array(
    'debug' => true,
    'roots' => array(
        array(
            'driver'        => 'LocalFileSystem',          
            'path'          => '../../pages/path/to/files/'.($_GET['mypath']).'/', 
            'URL'           => '../../pages/path/to/files/'.($_GET['mypath']).'/', 
            'uploadDeny'    => array('all'),               
            'uploadAllow'   => array('image', 'text/plain'),
            'uploadOrder'   => array('deny', 'allow'),      
            'accessControl' => 'access'

        )
    )
);

// run elFinder
$connector = new elFinderConnector(new elFinder($opts));
$connector->run();
基本上,如果您使用任何浏览器(IE除外),您的根目录将正确设置为
$\u GET['mypath']
,但如果您在IE中,则根目录将设置为
/files/
(该目录仅比所需目录高一级)因此,用户可以看到他不应该访问的文件夹

你知道为什么会这样吗

另外,我唯一的理论是IE JavaScript引擎可能发送了错误的
mypath
变量

elFinder代码如下:

<script type="text/javascript" charset="utf-8">
    $().ready(function() {
        var elf = $('#elfinder').elfinder({
            // lang: 'ru',             
            url : 'libraries/elFinder/connector.php', 
            rememberLastDir : false,
            useBrowserHistory : false,
            customData : {mypath : <?php echo json_encode($_GET['CIF']); ?>}
        }).elfinder('instance');            
    });
</script>
如果您强制
requestType
post
,那么它在所有浏览器中都将始终是
post
,因此您不必担心检查浏览器是否发布或获取。

$()。就绪(函数(){
var elf=$('#elfinder').elfinder({
//郎:"如",,
url:'libraries/elFinder/connector.php',
requestType:'post',
记住lastdir:false,
useBrowserHistory:错误,
自定义数据:{mypath:}
}).elfinder(“实例”);
});
如果您强制
requestType
post
,那么它在所有浏览器中都将始终是
post
,因此您不必担心检查浏览器是否发布或获取。

$()。就绪(函数(){
var elf=$('#elfinder').elfinder({
//郎:"如",,
url:'libraries/elFinder/connector.php',
requestType:'post',
记住lastdir:false,
useBrowserHistory:错误,
自定义数据:{mypath:}
}).elfinder(“实例”);
});
如果您强制
requestType
post
,那么它在所有浏览器中都将始终是
post
,因此您不必担心检查浏览器是否发布或获取

<script type="text/javascript" charset="utf-8">
    $().ready(function() {
        var elf = $('#elfinder').elfinder({
            // lang: 'ru',             
            url : 'libraries/elFinder/connector.php', 
            rememberLastDir : false,
            useBrowserHistory : false,
            customData : {mypath : "mypath_folder"}
        }).elfinder('instance');            
    });
</script>
$().ready(function() {
    var elf = $('#elfinder').elfinder({
        // lang: 'ru',             
        url : 'libraries/elFinder/connector.php',
        requestType : 'post',
        rememberLastDir : false,
        useBrowserHistory : false,
        customData : {mypath : <?php echo json_encode($_GET['CIF']); ?>}
    }).elfinder('instance');            
});
$().ready(function() {
    var elf = $('#elfinder').elfinder({
        // lang: 'ru',             
        url : 'libraries/elFinder/connector.php',
        requestType : 'post',
        rememberLastDir : false,
        useBrowserHistory : false,
        customData : {mypath : <?php echo json_encode($_GET['CIF']); ?>}
    }).elfinder('instance');            
});