First go to the source code, you can copy it to your own computer and run it ~
Copy the code The code is as follows:
// Upload file information
$img = $_FILES['img'];
if ($img)
{
//File storage directory, same level as this php file
$dir = dirname(__file__);
$i = 0 ;
foreach ($img['tmp_name'] as $value)
{
$filename = $img['name'][$i];
if ($value)
{
$savepath="$dir\$ filename";
$state = move_uploaded_file($value, $savepath);
//If the upload is successful, preview
if($state)
{
echo " ";
}
}
$i++;
}
}
?>