upload.php->文件上传
时间:2021-07-01 10:21:17
帮助过:12人阅读
upload.php --->文件上传
header("Content-type:text/html;charset=utf-8");
print_r($_FILES['file']);
$filename=$_FILES['file']['name'];
if(!$_FILES['file']['error'])
{
if(move_uploaded_file($_FILES['file']['tmp_name'],"./upload/".$filename))
{
echo "文件上传成功";
}else{
echo "文件上传失败";
}
}else{
echo "文件上传错误";
}
?>