删除已上传的文件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 评论
评论
登录后即可评论 去登录