文件上传代码
view plaincopy to clipboardprint?
文档上传 文档上传 提交文件代码
view plaincopy to clipboardprint?
文件上传结果 if ($_POST["submitfile"]!="")
{
$Path="./".date('Ym')."/";
if (!is_dir($Path))//创建路径
{ mkdir($Path); }
echo "
";
for ($i=0;$i{ //$_FILES["filelist"]["size" The order of ][$i] cannot be changed, because fileist is a two-dimensional array
if ($_FILES["filelist"]["size"][$i]!=0)
{
$File=$Path.date('Ymdhm')."_".$_FILES["filelist"]["name"][$i];
if (move_uploaded_file($_FILES["filelist"][ "tmp_name"][$i],$File))
{ echo "File uploaded successfully. File type:".$_FILES["filelist"]["type"][$i]." "."File name :"
.$_FILES["filelist"]["name"][$i]."
"; }
else
{ echo "File name:".$_FILES[" filelist"]["name"][$i]."Upload failed"; }
}
}
echo "
Return