扫码录入成绩和下载扫码信息表完成
This commit is contained in:
1 parent
1655d11b94
commit
99d2cb688a
16 files changed
+287
-106
No files matched your search
@@ -269,7 +269,7 @@ class Index extends Base
|
||||
// 获取表单上传文件 例如上传了001.jpg
|
||||
$file = request()->file('file');
|
||||
// 移动到框架应用根目录/uploads/ 目录下
|
||||
$info = $file->move( '..\uploads\teacher');
|
||||
$info = $file->move( '..\public\uploads\teacher');
|
||||
if($info){
|
||||
// 成功上传后 获取上传信息
|
||||
$list['category'] = $info->getExtension();
|
||||
@@ -279,7 +279,7 @@ class Index extends Base
|
||||
//将文件信息保存
|
||||
$data = Fields::create($list);
|
||||
|
||||
$data ? $data = array('msg'=>'上传成功','val'=>true,'url'=>'..\uploads\teacher\\'.$list['url']) : $data = array('msg'=>'保存文件信息失败','val'=>false,'url'=>null);
|
||||
$data ? $data = array('msg'=>'上传成功','val'=>true,'url'=>'..\public\uploads\teacher\\'.$list['url']) : $data = array('msg'=>'保存文件信息失败','val'=>false,'url'=>null);
|
||||
}else{
|
||||
// 上传失败获取错误信息
|
||||
$data = array('msg'=>$file->getError(),'val'=>false,'url'=>null);
|
||||
|
||||
Reference in new issue
Block a user