查看时不显示文件路径,可有解? [ 2.0 版本 ]
FileInput
use kartik\widgets\FileInput;
// Usage with ActiveForm and model
echo $form->field($model, 'avatar')->widget(FileInput::classname(), [
'options' => ['accept' => 'image/*'],
]);
// With model & without ActiveForm
echo '<label class="control-label">Add Attachments</label>';
echo FileInput::widget([
'model' => $model,
'attribute' => 'attachment_1',
'options' => ['multiple' => true]
]);
这两种方法都不行
共 1 个回答
-
你这个上传图片的扩展我也看了 默认显示的是文件名称吧,而不是路径
共 5 条回复jhomephper 回复于 2015-06-12 22:42 回复是名称都不显示!
jhomephper 回复于 2015-06-12 22:49 回复那么了,你用什么东西代替它了?
@jhomephper 悄悄的告诉你 我用的 编辑器 替代的,图片上传功能单一 所以我放弃了使用 图片上传类
jhomephper 帝都
注册时间:2015-05-05
最后登录:2021-04-20
在线时长:78小时1分
最后登录:2021-04-20
在线时长:78小时1分
- 粉丝32
- 金钱5330
- 威望10
- 积分6210