被PHP的文件上传下了一跳,这是我写过的实现最简单的文件上传了(俺写过java\asp\c#)<?php$f=&$HTTP_POST_FILES['file'];$dest_dir='uploads';//设定上传目录$dest=$dest_dir.'/'.date("ymd")."_".$f['name']; //设置文件名为日期加上文件名避免重复$r=move_uploaded_file($f['tmp_name'],$dest);?><form action="index.php" enctype="multipart/form-data" method="POST"> <input type="file" name="file"> <input type="submit" /> </form> 转载于:https://www.cnblogs.com/amboyna/archive/2008/06/25/1229319.html