By - lmypersonPosted on 2025年7月11日Posted in 笔记删除已上传的文件unlink /*设置上传路径*/ $savePath = SITE_PATH . ‘/data/upload/excel/forbidplayer/’; /*以时间来命名上传的文件*/ $str = uniqid() . date(‘Ymdhis’); $file_name = $str . “.” . $file_type; $myfile = $savePath . $file_name; if (file_exists($myfile)) { @unlink($myfile); } 0 0 Tags:PHP