<form enctype="multipart/form-data" action="3.php" method="post">
<input type="hidden" name="max_file_size" value="30000" />
选择文件:<input type="file" name="userfile" />
<input type="submit" value="上传文件" name="buttom"/>
</form><?php
header('Content-Type:text/html;charset=utf-8');
$example=substr($_FILES["userfile"]["name"],strrpos($_FILES["userfile"]["name"],".")+1);
$mydir="upfiles/".md5(time()).".".$example;
move_uploaded_file($_FILES["userfile"]["tmp_name"],$mydir);
?>
- 1 回答
- 0 关注
- 2043 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消