thinkphp5 文件上传方法,代码如下:
建立/application/index/controller/Index.php
<?php
namespace app\index\controller;
use think\Controller;
use think\Request;
class Index extends Controller
{
public function index()
{
return $this->fetch();
}
public function upload(){
// 获取表单上传文件 例如上传了001.jpg
$file = request()->file('image')...
作者:admin | 发布:
Warning: Use of undefined constant Y年n月d日 - assumed 'Y年n月d日' (this will throw an Error in a future version of PHP) in
/www/wwwroot/blog.wmphp.com/wp-content/themes/wmphp/index.php on line
19
2017年8月31日 | 分类:
Thinkphp | 阅读:1,321次 |