/*设置上传路径*/
$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);
}
发表回复