<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); ?>
慕粉1417175223
慕田峪3555374