我使用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
内嵌了这些元素和
名为require
和DIR_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)