<?php
$dirname = 'down';
if(!is_dir($dirname)) {
mkdir($dirname, 0777, true);
}
$target_path = "./down/";
$target_path = $target_path.($_FILES['file']['name']);
$target_path = iconv("UTF-8","gb2312", $target_path);
if(move_uploaded_file($_FILES['file']['tmp_name'], $target_path)) {
echo "The file ".( $_FILES['file']['name'])." has been uploaded.";
}else{
echo "There was an error uploading the file, please try again! Error Code: ".$_FILES['file']['error'];
}
$dirname = 'down';
if(!is_dir($dirname)) {
mkdir($dirname, 0777, true);
}
$target_path = "./down/";
$target_path = $target_path.($_FILES['file']['name']);
$target_path = iconv("UTF-8","gb2312", $target_path);
if(move_uploaded_file($_FILES['file']['tmp_name'], $target_path)) {
echo "The file ".( $_FILES['file']['name'])." has been uploaded.";
}else{
echo "There was an error uploading the file, please try again! Error Code: ".$_FILES['file']['error'];
}
?>