如何去除THINKPHP5文件上传时自动生成的时间目录
去除时间目录
找到tp5核心内容
/thinkphp/libary/think/file.php
protected function buildSaveName($savename)
{
// 自动生成文件名
if (true === $savename) {
if ($this->rule instanceof \Closure) {
$savename = call_user_func_array($this->rule, [$this]);
} else {
switch ($this->rule) {
case 'date':
$savename =date('Ymd') . DS . md5(microtime(true));
break;
default:
if (in_array($this->rule, hash_algos()</