我正在尝试理解以下代码中具体$key => $tmp_name
正在做什么:
if(isset($_FILES['files']))
{
foreach($_FILES['files']['tmp_name'] as $key => $tmp_name)
{
echo $_FILES['files']['name'][$key], "\n";
move_uploaded_file($tmp_name, 'img/'.$_FILES['files']['name'][$key]);
}
}
答案 0 :(得分:2)