返回 文件上传,文件...... 登陆

文件上传,文件上传,文件上传,

幸福敲门 2019-07-18 18:31:09 227

文件上传,文件上传,

<?php

require 'container.php';

class Facade

{

public function demo3()

{

return $this->view->fetch();

}

public function demo4()

{

$file = Request::file('file');

if(is_null($file)){

$this->error('没有选择任何文件');

}

$file = $file->validate(['ext'=>'jpg,jpeg,png'])->move('uploads');

if(false == $res) {

$this->error($file->getError());

}

$this->success('上传成功');

}

}


最新手记推荐

• 用composer安装thinkphp框架的步骤 • 省市区接口说明 • 用thinkphp,后台新增栏目 • 管理员添加编辑删除 • 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消 回复 发送
  • PHP中文网