当前位置: 首页>>代码示例>>PHP>>正文


PHP elFinder::run方法代码示例

本文整理汇总了PHP中elFinder::run方法的典型用法代码示例。如果您正苦于以下问题:PHP elFinder::run方法的具体用法?PHP elFinder::run怎么用?PHP elFinder::run使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在elFinder的用法示例。


在下文中一共展示了elFinder::run方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionConnector

 public function actionConnector()
 {
     $this->layout = false;
     Yii::import('elfinder.vendors.*');
     require_once 'elFinder.class.php';
     $opts = array('root' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'upload' . DIRECTORY_SEPARATOR, 'URL' => Yii::app()->baseUrl . '/upload/', 'rootAlias' => 'Home');
     $fm = new elFinder($opts);
     $fm->run();
 }
开发者ID:ngdvan,项目名称:lntguitar,代码行数:9,代码来源:DefaultController.php

示例2: connector

 public function connector()
 {
     $this->show->Title = 'Менеджер файлов';
     include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'elFinder.class.php';
     //		$log = new elFinderLogger();
     $opts = array('root' => DOC_ROOT . 'var/custom', 'URL' => BASE_PATH . 'var/custom/', 'rootAlias' => $this->show->Title);
     $fm = new elFinder($opts);
     $fm->run();
 }
开发者ID:kizz66,项目名称:meat,代码行数:9,代码来源:Api.php

示例3: log

<?php

error_reporting(0);
// Set E_ALL for debuging
if (function_exists('date_default_timezone_set')) {
    date_default_timezone_set('Europe/Moscow');
}
include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'elFinder.class.php';
/**
 * Simple example how to use logger with elFinder
 **/
class elFinderLogger implements elFinderILogger
{
    public function log($cmd, $ok, $context, $err = '', $errorData = array())
    {
        if (false != ($fp = fopen('./log.txt', 'a'))) {
            if ($ok) {
                $str = "cmd: {$cmd}; OK; context: " . str_replace("\n", '', var_export($context, true)) . "; \n";
            } else {
                $str = "cmd: {$cmd}; FAILED; context: " . str_replace("\n", '', var_export($context, true)) . "; error: {$err}; errorData: " . str_replace("\n", '', var_export($errorData, true)) . "\n";
            }
            fwrite($fp, $str);
            fclose($fp);
        }
    }
}
$opts = array('root' => '../../files', 'URL' => 'http://localhost/mws/plugins/elfinder/files/', 'rootAlias' => 'Home');
$fm = new elFinder($opts);
$fm->run();
开发者ID:hucongyang,项目名称:lulucms2,代码行数:29,代码来源:connector.php

示例4: run

 public function run()
 {
     require_once dirname(__FILE__) . '/php/elFinder.class.php';
     $fm = new \elFinder($this->settings);
     $fm->run();
 }
开发者ID:zxbodya,项目名称:yii2-elfinder,代码行数:6,代码来源:ConnectorAction.php

示例5: run

 public function run()
 {
     $this->options = array_merge($this->options, array('root' => Yii::getPathOfAlias('webroot.data'), 'URL' => Yii::app()->baseUrl . '/data/', 'rootAlias' => 'Home'));
     $fm = new elFinder($this->options);
     $fm->run();
 }
开发者ID:ASDAFF,项目名称:its-crm,代码行数:6,代码来源:ElFinderAction.php

示例6: filesAction

    /**
     * Файловый менеджер
     * 
     * @return void
     */
    public function filesAction()
    {
        /**
         * При Ajax и POST - запросах инициализируем PHP-коннектор
         */
        if ($this->_request->isXmlHttpRequest() || $this->_request->isPost()) {
            error_reporting(0);
            /**
             * Основные опции
             */
            $opts = array('root' => DOCUMENT_PATH . '/uploads/files/', 'URL' => '/uploads/files/', 'tmbDir' => '.tmb', 'tmbCrop' => false, 'tmbCleanProb' => 50);
            /**
             * Инициализация elFinder
             */
            require_once 'Phorm/Plugin/Elfinder/elFinder.class.php';
            $connector = new elFinder($opts);
            $connector->run();
            /**
             * При GET-запросах инициализируем JS-библиотеку
             */
        } else {
            /**
             * Подключаем файлы стилей и скриптов
             */
            $this->_boot->jquery->addJavascriptFile($this->view->BaseUrl() . '/ui/elfinder/js/elfinder.min.js');
            $this->_boot->jquery->addJavascriptFile($this->view->BaseUrl() . '/ui/elfinder/js/i18n/elfinder.ru.js');
            $this->_boot->jquery->addStylesheet($this->view->BaseUrl() . '/ui/elfinder/css/elfinder.css');
            /**
             * Основные опции
             */
            $opts = array('lang' => 'ru', 'url' => $this->view->siteUrl() . '/control/browser/files/', 'places' => $this->_translate->_(''), 'cssClass' => 'ui-widget-content ui-corner-all', 'closeOnEditorCallback' => false);
            $opts = ZendX_JQuery::encodeJson($opts);
            /**
             * Опции для вставки в различные редакторы
             */
            $editorCallback = '';
            if (isset($this->_params['for']) && isset($this->_params['selector'])) {
                switch ($this->_params['for']) {
                    case 'markitup':
                        $js = 'function(url){
							return phorm_ui_selectFileForMarkitup("' . $this->view->escape($this->_params['selector']) . '",url);
						}';
                        $opts = substr($opts, 0, -1) . ',editorCallback: ' . $js . '}';
                        break;
                    case 'tinymce':
                        $this->_boot->jquery->addJavascriptFile($this->view->BaseUrl() . '/ui/tinymce/tiny_mce_popup.js');
                        $js = 'function(url){
							return phorm_ui_selectFileForTinyMCE("' . $this->view->escape($this->_params['selector']) . '",url);
						}';
                        $opts = substr($opts, 0, -1) . ',editorCallback: ' . $js . '}';
                        break;
                }
            }
            /**
             * Инициализация JS elFinder
             */
            $elementid = 'filemanager';
            $this->_boot->jquery->addOnload('$("#' . $elementid . '").elfinder(' . $opts . ').ready(function(){ phorm_ui_correctElfinder(this); })');
            $this->view->assign('FileManager', '<div id="' . $elementid . '"></div>');
        }
    }
开发者ID:ei-grad,项目名称:phorm,代码行数:66,代码来源:Browser.php


注:本文中的elFinder::run方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。