本文整理汇总了PHP中FileUpload::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP FileUpload::__construct方法的具体用法?PHP FileUpload::__construct怎么用?PHP FileUpload::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileUpload
的用法示例。
在下文中一共展示了FileUpload::__construct方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($name)
{
parent::__construct();
$this->setName($name);
$this->extensions = trimsplit(',', strtolower($GLOBALS['TL_CONFIG']['uploadTypes']));
$this->maxFileSize = $GLOBALS['TL_CONFIG']['maxFileSize'];
$this->imageWidth = $GLOBALS['TL_CONFIG']['imageWidth'];
$this->imageHeight = $GLOBALS['TL_CONFIG']['imageHeight'];
$this->gdMaxImgWidth = $GLOBALS['TL_CONFIG']['gdMaxImgWidth'];
$this->gdMaxImgHeight = $GLOBALS['TL_CONFIG']['gdMaxImgHeight'];
}
示例2: __construct
public function __construct($opts, $form)
{
parent::__construct($opts, $form);
// make sure we have the thumb_path, if not default it to the upload path
if ($this->make_thumb === true) {
if ($this->thumb_path == null) {
$this->thumb_path = $this->upload_path;
}
if ($this->thumb_name == null) {
throw new \Exception('Thumb name not set for ' . $this->name);
}
}
}
示例3: __construct
public function __construct($arrAttributes)
{
parent::__construct();
$this->arrData = $arrAttributes;
$file = \Input::get('file', true);
// Send the file to the browser
if ($file != '') {
if (!static::isAllowedDownload($file)) {
header('HTTP/1.1 403 Forbidden');
die('No file access.');
}
\Controller::sendFileToBrowser($file);
}
global $objPage;
$this->blnIsXhtml = $objPage->outputFormat == 'xhtml';
$this->loadDcaConfig();
}
示例4: __construct
public function __construct($arrAttributes)
{
parent::__construct();
$this->arrData = $arrAttributes;
$this->strName = $arrAttributes['name'];
}