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


PHP Settings::get_allowed_extensions方法代码示例

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


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

示例1: filemanager

 /**
  * Mootools FileManager loader
  * Equiv. to the "manager.php" file in mootools-filemanager Demo folder.
  *
  * @param null $event
  * @param bool $resize
  * @param bool $uploadAuthData
  */
 public function filemanager($event = NULL, $resize = FALSE, $uploadAuthData = FALSE)
 {
     // Get allowed mimes
     $allowed_mimes = implode(',', Settings::get_allowed_mimes());
     $params = array('filesDir' => '' . Settings::get('files_path') . '/', 'thumbsDir' => '' . Settings::get('files_path') . '/.thumbs/.backend/', 'assetsDir' => 'themes/admin/javascript/filemanager/assets/', 'documentRoot' => DOCPATH, 'baseUrl' => base_url(), 'upload' => TRUE, 'destroy' => TRUE, 'create' => TRUE, 'move' => TRUE, 'download' => FALSE, 'thumbSmallSize' => Settings::get('media_thumb_size') != '' ? Settings::get('media_thumb_size') : 120, 'thumbBigSize' => 500, 'maxImageDimension' => array('width' => Settings::get('picture_max_width') != '' ? Settings::get('picture_max_width') : 2000, 'height' => Settings::get('picture_max_height') != '' ? Settings::get('picture_max_height') : 2000), 'maxUploadSize' => intval(substr(ini_get('upload_max_filesize'), 0, -1)) * 1024 * 1024, 'filter' => $allowed_mimes, 'allowed_extensions' => Settings::get_allowed_extensions());
     $this->load->library('Filemanager', $params);
     // Fires the Event called by FileManager.js
     // The answer of this called id a JSON object
     // If no event is givven, it will call the "display" event
     if ($event != 'upload') {
         $this->Filemanager->fireEvent(!is_null($event) ? $event : NULL);
     } else {
         $this->Filemanager->fireEvent($event);
     }
     die;
 }
开发者ID:pompalini,项目名称:emngo,代码行数:24,代码来源:media.php

示例2: has_allowed_extension

 /**
  * @param $filename
  *
  * @return bool
  */
 public function has_allowed_extension($filename)
 {
     $file_extension = pathinfo($filename, PATHINFO_EXTENSION);
     $extensions = Settings::get_allowed_extensions();
     if (in_array($file_extension, $extensions)) {
         return TRUE;
     }
     return FALSE;
 }
开发者ID:trk,项目名称:ionize,代码行数:14,代码来源:media_model.php

示例3: implode

?>
,		
		pictureArray:Array('<?php 
echo implode("','", Settings::get_allowed_extensions('picture'));
?>
'),
		musicArray:Array('<?php 
echo implode("','", Settings::get_allowed_extensions('music'));
?>
'),
		videoArray:Array('<?php 
echo implode("','", Settings::get_allowed_extensions('video'));
?>
'),
		fileArray:Array('<?php 
echo implode("','", Settings::get_allowed_extensions('file'));
?>
')
	});

	/* If user's theme has a tinyMCE.css content CSS file, load it.
	 * else, load the standard tinyMCE content CSS file
	 *
	 */

	<?php 
if (is_file(FCPATH . 'themes/' . Settings::get('theme') . '/assets/css/tinyMCE.css')) {
    ?>
		var tinyCSS = '<?php 
    echo base_url() . 'themes/' . Settings::get('theme') . '/assets/css/tinyMCE.css';
    ?>
开发者ID:BGCX261,项目名称:zillatek-project-svn-to-git,代码行数:31,代码来源:desktop.php

示例4: _getFilemanagerSettings

 private function _getFilemanagerSettings()
 {
     // Get allowed mimes
     $mimes = Settings::get_allowed_mimes();
     $allowed_mimes = implode(',', $mimes);
     $params = array('filesDir' => '' . Settings::get('files_path') . '/', 'thumbsDir' => '' . Settings::get('files_path') . '/.thumbs/.backend/', 'assetsDir' => 'themes/admin/javascript/filemanager/assets/', 'documentRoot' => DOCPATH, 'baseUrl' => base_url(), 'upload' => TRUE, 'destroy' => TRUE, 'create' => TRUE, 'move' => TRUE, 'cleanFileName' => self::$upload_clean_file_name, 'download' => FALSE, 'thumbSmallSize' => Settings::get('media_thumb_size') != '' ? Settings::get('media_thumb_size') : 120, 'thumbBigSize' => 500, 'maxImageDimension' => array('width' => Settings::get('picture_max_width') != '' ? Settings::get('picture_max_width') : 2000, 'height' => Settings::get('picture_max_height') != '' ? Settings::get('picture_max_height') : 2000), 'maxUploadSize' => (int) substr(ini_get('upload_max_filesize'), 0, -1) * 1024 * 1024, 'filter' => $allowed_mimes, 'allowed_extensions' => Settings::get_allowed_extensions());
     return $params;
 }
开发者ID:trk,项目名称:ionize,代码行数:8,代码来源:file.php


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