當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。