<?php
if(!$uploadAction):
?><html>
<head>
<title>wen jian shang zai jie mian</title>
</head>
<body><table><center>
<form enctype="multipart/form-data"name="submitform"action="" method="post">
<input type="hidden" name="uploadaction" value="1">
<input type="hidden" name="max_file_size" value="10000000">
<tr>
<td><input name="uploadfile" type="file" size="30"></td>
</tr>
<tr>
<td><input name="submit" value="提交" type="submit"></td>
<td><input name="reset" value="重指" type="reset"></td>
</tr>
</form></center></table></body>
</html><?php
else:
?><html>
<head>
<title>wen jian shang zai dai ma</title>
</head><?php
$uploadaction=0;
$timelimit=60;
set_time_limit($timelimit);
$uploaddir='c:/upload';
$uploadfile=$uploaddir.$_files['usefile']['name'];
$timefile=$_files['userfile']['tmp_name'];
$file_size=$_files['userfile']['size'];
$errno=$_files['userfile']['error'];
if(($tmpfile!="none")&&($tmpfile!=""))
{
if($file_size<1024)
{
$strfilesize=(string)$file_size."字节";
}
else if($file_size<(1024*1024))
{
$strfilesize=number_format((double)($file_size/1024),1)."kb";
}
else
{
$strfilesize=number_format((double)($file_size/(1024*1024))."mb";
}
if(!file_exist($uploadfile))
{
if(move_uploaded_file($tmpfile,$uploadfile))
{
echo"文件 $uploadfile($strfilesize)上载成功";
}
else
{
echo"文件 $uploadfile 失败1 (错误好 :$errno)";
}
}
else
{
echo"文件 $uploadfile 已经存在! (错误好:$errno )";
}
}
else
{
echo"没选择文件,或则超过了$max_file_size!";
}
set_time_limit(30);
?> <br><a herf="nana2.php">返回</a>
</body>
</html><?
endif;
?>
if(!$uploadAction):
?><html>
<head>
<title>wen jian shang zai jie mian</title>
</head>
<body><table><center>
<form enctype="multipart/form-data"name="submitform"action="" method="post">
<input type="hidden" name="uploadaction" value="1">
<input type="hidden" name="max_file_size" value="10000000">
<tr>
<td><input name="uploadfile" type="file" size="30"></td>
</tr>
<tr>
<td><input name="submit" value="提交" type="submit"></td>
<td><input name="reset" value="重指" type="reset"></td>
</tr>
</form></center></table></body>
</html><?php
else:
?><html>
<head>
<title>wen jian shang zai dai ma</title>
</head><?php
$uploadaction=0;
$timelimit=60;
set_time_limit($timelimit);
$uploaddir='c:/upload';
$uploadfile=$uploaddir.$_files['usefile']['name'];
$timefile=$_files['userfile']['tmp_name'];
$file_size=$_files['userfile']['size'];
$errno=$_files['userfile']['error'];
if(($tmpfile!="none")&&($tmpfile!=""))
{
if($file_size<1024)
{
$strfilesize=(string)$file_size."字节";
}
else if($file_size<(1024*1024))
{
$strfilesize=number_format((double)($file_size/1024),1)."kb";
}
else
{
$strfilesize=number_format((double)($file_size/(1024*1024))."mb";
}
if(!file_exist($uploadfile))
{
if(move_uploaded_file($tmpfile,$uploadfile))
{
echo"文件 $uploadfile($strfilesize)上载成功";
}
else
{
echo"文件 $uploadfile 失败1 (错误好 :$errno)";
}
}
else
{
echo"文件 $uploadfile 已经存在! (错误好:$errno )";
}
}
else
{
echo"没选择文件,或则超过了$max_file_size!";
}
set_time_limit(30);
?> <br><a herf="nana2.php">返回</a>
</body>
</html><?
endif;
?>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货