php中的elfinder动态配置

时间:2016-10-15 12:59:22

标签: php elfinder

我使用Elfinder,我想整合它。 我使用命名空间和elfinder返回下面这个错误。 我需要根据主机站点创建动态链接。

Thak you

  

后端响应无效。

Data is not JSON.
<br /> <b>Notice</b>: Undefined variable: OSCOM in <b>/home/www//boutique/includes/Core/Conf/ElFinderConfig.php</b> on line <b>11</b><br /> <br /> <b>Fatal error</b>: Uncaught Error:
     

在null中调用成员函数getConfig()   /home/www//boutique/includes/Core/Conf/ElFinderConfig.php:11   堆栈跟踪:#0   /home/www/boutique/ext/elfinder_2x/php/connector.minimal.php(71):   require()#1 {main}抛出    /home/www/boutique/includes/Core/Conf/ElFinderConfig.php 的   在线 11

  

minimal.connector.php

我在minimal.connector.php内嵌了这些元素和 名为requireDIR_FS_CATALOG_IMAGES

DIR_WS_CATALOG_IMAGES
require('../../../includes/Core/Conf/ElFinderConfig.php');

//连接器选项的文档: // https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options

$opts = array(
  'debug' => true,  //see a new menu in filefinder with all informations
  'roots' => array(
                    array(
                      'driver'        => 'LocalFileSystem',           // driver for accessing file system (REQUIRED)
                    //'path'          => '../files/',                 // path to files (REQUIRED)
//                    'path'          => '../../../sources/image/',         // path to files (REQUIRED)
//                    'URL'           =>  '../../../../boutique/sources/image/', // URL to files (REQUIRED)

                      'path'          =>  DIR_FS_CATALOG_IMAGES,         // path to files (REQUIRED)
                      'URL'           =>  DIR_WS_CATALOG_IMAGES, // URL to files (REQUIRED)

...

我改变了这个

            'path'          => '../../../sources/image/',         // path to files (REQUIRED)
            'URL'           =>  '../../../../boutique/sources/image/', // URL to files (REQUIRED)

由此

              'path'          =>  DIR_FS_CATALOG_IMAGES,         // path to files (REQUIRED)
              'URL'           =>  DIR_WS_CATALOG_IMAGES, // URL to files (REQUIRED)

和ElFinderConfig.php是这样写的

<?php
  use ClicShopping\OM\OSCOM;

 define('DIR_FS_CATALOG_IMAGES',  OSCOM->getConfig('dir_root', 'Shop') . 'sources/image/');       // path to files (REQUIRED)
 define('DIR_WS_CATALOG_IMAGES',  OSCOM::getConfig('http_path', 'Shop'));       // path to files (REQUIRED)

0 个答案:

没有答案