copy 函数是从系统的临时目录里copy的,直接从e盘copy传到服务器上当然不好使,因为服务上没有这个e盘的路径。userfile是表单中文件的名字。$_FILES['userfile']['name']  
客户端机器文件的原名称。    
 
$_FILES['userfile']['type']  
文件的  MIME  类型,需要浏览器提供该信息的支持,例如“image/gif”。    
 
$_FILES['userfile']['size']  
已上传文件的大小,单位为字节。    
 
$_FILES['userfile']['tmp_name']  
文件被上传后在服务端储存的临时文件名。    
 
$_FILES['userfile']['error']  
 
可以用$uploadfile_name\$uploadfile_type等等来解决,upload代表上传文件,例如问题中的:pic  

解决方案 »

  1.   

    $pic="../images/".$ima_name; // "../images/"为存放图片的路径
    copy($ima,$pic);
    $ima为表单中
    <input name="ima" type="file" id="ima">的name这样写得先确保你的register_globals = On
      

  2.   

    <input name="ima" type="file" id="ima">copy($_FILES['ima']['tmp_name'], "./$_FILES['userfile']['name']");
      

  3.   

    更改一下。<input name="ima" type="file" id="ima">copy($_FILES['ima']['tmp_name'], "./$_FILES['ima']['name']");
      

  4.   

    $tempfile = $_FILES['filename']['tmp_name'];
    $temppath = str_replace("\\","/", $fileName); 

    if(!move_uploaded_file($temppath,$destfile))
    {
    echo ("error");
    return;
    }
      

  5.   

    $tempfile = $_FILES['filename']['tmp_name'];
    $temppath = str_replace("\\","/", $tempfile); 

    if(!move_uploaded_file($temppath,$destfile))
    {
    echo ("error");
    return;
    }要注意windows系统与unix系统的区别,即'\\'转换为'/'。
    虎翼网上调试成功