时间:2021-07-01 10:21:17 帮助过:13人阅读
if(function_exists('move_uploaded_file')){
move_uploaded_file($_FILES['file1']['tmp_name'],$realFile);
$path=$upfileDir.$targetFile;//可以在此进行数据库操作
$mysql=new mysql();
$now_time=date("Y-m-d H:i:s",time());
$real_type=strtolower($fileExt);
$sql="insert into file (path,time,real_type,file_type) values('$path','$now_time','$real_type','$type')";
$mysql->query($sql);
}
else{
@copy($_FILES['file1']['tmp_name'],$realFile);
}