Php 如何在Laravel中提交文件
我的表格如下Php 如何在Laravel中提交文件,php,file,laravel-4.2,Php,File,Laravel 4.2,我的表格如下 {{ Form::open(array( 'enctype' => 'multipart/form-data'))}} <div class="vendor-box-wrap"> <div class="page3-suggested-cat-wrap" style="float: left;width: 100%;border-bottom: 1px dotted;padding-bottom: 10px;margin-le
{{ Form::open(array( 'enctype' => 'multipart/form-data'))}}
<div class="vendor-box-wrap">
<div class="page3-suggested-cat-wrap" style="float: left;width: 100%;border-bottom: 1px dotted;padding-bottom: 10px;margin-left: 20px;">
<label style="width:9%;" for="9009" class="page3-suggested-cat-label" >BoQ</label>
<div class="input-group" style="margin-top: 10px;
width: 70%;">
<span class="form-control"></span>
<span class="input-group-btn">
<span class="btn btn-primary" onclick="$(this).parent().find('input[type=file]').click();">Browse</span>
<input name="file|90009|107" id="file|9009"
value="" onchange="$(this).parent().parent().find('.form-control').html($(this).val().split(/[\\|/]/).pop());"
style="display: none;" type="file">
</span>
</div>
</br> <center><h2><strong>OR</strong></h2></center>
</div>
</div>
<div class="next-btn-wrap"><div class="cf"></div>
<div class="back-btn-wrap">
{{ Form::submit('Back',array('class' => 'back-btn', 'name' => 'back'))}}
</div>
<div class="save-btn-wrap">
{{ Form::submit('Save',array('class' => 'save-btn','name' => 'save'))}}
</div>
{{ Form::submit('Next',array('class' => 'next-btn','name' => 'next'))}}
</div>
{{ Form::close()}}
我的问题是我无法获取后端的文件详细信息
if语句
if(isset($ids[0]) && $ids[0]=="file" ){
}
这总是错误的
你知道我该怎么解决这个问题吗。我还尝试将表单函数更改为
{{ Form::open(array('files' => true)) }}
仍然没有显示文件详细信息要发送文件,我个人使用这种方法 视图: 控制器:
$thefile = Input::file('thefile');
希望这有帮助 要发送文件,我个人使用这种方法 视图: 控制器:
$thefile = Input::file('thefile');
希望这有帮助
$thefile = Input::file('thefile');