默认不加载.env
This commit is contained in:
parent
6446be3a2f
commit
fde81c5f2b
|
@ -3,6 +3,7 @@
|
|||
namespace app\controller;
|
||||
|
||||
use think\Request;
|
||||
use think\Env;
|
||||
|
||||
class Index
|
||||
{
|
||||
|
@ -22,7 +23,8 @@ class Index
|
|||
$file = request()->file('file');
|
||||
$trueName = $file->getOriginalName();
|
||||
|
||||
$serverIP = env('SERVER_ADDR', '192.168.1.161:8000');
|
||||
$env = new Env();
|
||||
$serverIP = $env->get('SERVER_ADDR', '192.168.1.65:8000');
|
||||
|
||||
// 组装保存路径
|
||||
$savename = \think\facade\Filesystem::disk('upload')->putFile('upload', $file);
|
||||
|
|
Loading…
Reference in New Issue