You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
532 B

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>C语言中文网——PHP文件上传</title>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data">
<input type="file" name="fileA">
<input type="submit" value="上传">
</form>
</body>
</html>
<?php
if(!empty($_FILES)){
foreach ($_FILES['fileA'] as $key => $value) {
echo $key.'=>'.$value.'<br>';
}
}
//显示成功了,但在文件夹中没有找到对应文件
?>