<?php
header("content-type:text/html;charset=utf-8");
session_start();
error_reporting(0);
if(!isset($_SESSION['admin_name'])){
   exit; 
}
$file_count=count($_FILES['tupian']['name']);
for($i=0;$i<$file_count;$i++){
    $file_name=$_FILES['tupian']['name'][$i];
    $file_tmp=$_FILES['tupian']['tmp_name'][$i];
    $file_exp=explode(".",$file_name);
    $file_pop=array_pop($file_exp);
    $file_rand="load".($i+1).".".$file_pop;
    $file_new="../../image/".$file_rand;
    move_uploaded_file($file_tmp,$file_new);  
}
echo "<script>alert('上传成功！');location='../index.php';</script>";

?>