本文整理汇总了PHP中yii\bootstrap\Html::activeFileInput方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::activeFileInput方法的具体用法?PHP Html::activeFileInput怎么用?PHP Html::activeFileInput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\bootstrap\Html
的用法示例。
在下文中一共展示了Html::activeFileInput方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
echo Url::to(['/roxymce/management/folder-list']);
?>
">
<div class="folder-list-item"></div>
</div>
</div>
<div class="col-sm-8 right-body">
<div class="actions first-row">
<div class="row">
<div class="col-sm-12">
<label class="btn btn-sm btn-primary" title="<?php
echo Yii::t('roxy', 'Upload files');
?>
">
<?php
echo Html::activeFileInput($uploadForm, 'file', ['multiple' => true, 'name' => 'UploadForm[file][]', 'data-href' => $fileListUrl, 'data-url' => Url::to(['/roxymce/management/file-upload', 'folder' => $defaultFolder])]);
?>
<i class="fa fa-plus"></i> <?php
echo Yii::t('roxy', 'Add file');
?>
</label>
<a class="btn btn-sm btn-info btn-file-preview" disabled="disabled" title="<?php
echo Yii::t('roxy', 'Preview selected file');
?>
">
<i class="fa fa-search"></i> <?php
echo Yii::t('roxy', 'Preview');
?>
</a>
<button type="button" class="btn btn-sm btn-warning btn-file-rename" disabled="disabled" title="<?php
echo Yii::t('roxy', 'Rename file');
示例2:
<hr>
</div>
<div class="col-sm-4">
<?php
echo \Yii::t('app', 'READING');
?>
</div>
<div class="col-sm-8">
<?php
echo Html::activeInput('text', $model, 'reading');
?>
mm<br />
- or - <br />
<?php
echo Html::activeFileInput($model, 'file', ['pluginOptions' => ['allowedFileExtensions' => ['txt', 'csv', 'xls', 'xlsx']]]);
?>
<br />
<?php
echo \Yii::t('app', 'Upload a .csv file');
?>
</div>
<div class="col-sm-12">
<hr>
</div>
<div class="col-sm-4">
<?php
echo \Yii::t('app', 'YOUR NAME');