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 | 分类:
Thinkphp | 阅读:
Warning: Use of undefined constant the_views - assumed 'the_views' (this will throw an Error in a future version of PHP) in
/www/wwwroot/blog.wmphp.com/wp-content/themes/wmphp/archive.php on line
19
|