<form name=myphoto method="post" enctype="multipart/form-data" 
                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
action="upload_pic1.php" >

解决方案 »

  1.   

    来晚了,就是在<form>里头忘了enctype="multipart/form-data"
      

  2.   

    <form enctype="multipart/form-data" action="next.php" method=post>
    上传文件必须用POST方法和enctype="multipart/form-data";提交的变量(除文件变量外)用$_POST['不带$的变量名']代替.
    如$_POST['username']代替$username文件变量:用$_FILES['imagefile']代替
    如:$imagefile_name--->$_FILES['imagefile']['name']
    $imagefile_size--->$_FILES['imagefile']['size']
    $imagefile--->$_FILES['imagefile']['tmp_name']===============================================
    另:上传的文件变量最好用下面的数组.因为在PHP4.3..后register_globals的默认值为Off$_FILES['userfile']['name'] 代替 $file_name
    客户端机器文件的原名称。 $_FILES['userfile']['type']
    文件的 MIME 类型,需要浏览器提供该信息的支持,例如“image/gif”。 $_FILES['userfile']['size']
    已上传文件的大小,单位为字节。 $_FILES['userfile']['tmp_name']
    文件被上传后在服务端储存的临时文件名。 $_FILES['userfile']['error']
    和该文件上传相关的错误代码。['error'] 是在 PHP 4.2.0 版本中增加的。 
      

  3.   

    自己去看PHP中文手册里的广告轮播的例子,讲的已经非常清楚了。这么好的资料不看:((((