应该是服务器禁止了copy函数吧

解决方案 »

  1.   

    嗯,应该是禁止了copy函数,
    没办法开,换别的方法吧,这是服务器供应商决定的
      

  2.   

    不是禁了COPY。
    是目录权限的问题吧。~~~~~~~~~~
      

  3.   

    建立个datafile文件夹。。
    <?
    if ($_POST)
    {
    $uploaddir = './datafile/';
    $uploadfile = $uploaddir.$_FILES['userfile']['name'];
    echo $uploadfile;
    echo "<br/>";
    echo $_FILES['userfile']['tmp_name'];
    echo "<br/>";
    echo  $uploaddir . $_FILES['userfile']['name'];
    print "<pre>";
    if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir . $_FILES['userfile']['name'])) {
       print "成功";
       print_r($_FILES);
    } else {
       print "失败";
       print_r($_FILES);
    }
    print "</pre>";
    }
    else
    {?>
    <form enctype="multipart/form-data" action="" method="POST">
    <input type="hidden" name="MAX_FILE_SIZE" value="100000">
    Send this file: <input name="userfile" type="file">
    <input type="submit" value="Send File">
    </form><?
    }
    ?>
      

  4.   

    还在用copy?
    这个是我写的小函数,让上传文件变得简单了一点。
    要求$path的权限必须为777,PHP4.3.X<?php
    function uploadfile($newfile, $oldfile, $path,$name){
    //newfile 为新文件,oldfile为旧文件名,path为文件路径,name为要为文件取的新文件名
    //第一个参数定义为:传递文件的控件(在HTML中表现为<input type=file ...)
    //第二个参数定义为:旧文件名,如果不存在旧文件,则该数为 none.jpg
    //第三个参数定义为:文件要存放的路径
    //第四个参数定义为:文件的新名称。
    //函数自动得到文件的扩展名。
       //检测是存在同名文件
       if(file_exists($path.$oldfile)){
        if(trim($oldfile)=="none.jpg"){ //排除的文件

    }
    else{
        //如果有,删除同名文件
        unlink($path.$oldfile);
         }
    }
    $ext=strstr($newfile['name'],".");//得到扩展名
    //echo "<br>文件扩展名:".$ext;
    if(move_uploaded_file($newfile['tmp_name'],$path.$name.$ext)){//移动临时文件到指定文件夹,并命名为新名称
    return $name.$ext;//返回新文件的名称。
    }else{
    return false;
    }
    }
    ?>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    先判断目录是否存在
    if(!is_dir("user")) mkdir("user");//判断是否存在user文件夹,该文件夹用来存放VIP用户上传的资料。然后在上传文件(这个和上面的那个文件夹风马牛不相及,只是举个例子而已):
    $msg=uploadfile($_FILES['file'.$i],"none",$path."/image3/",$picname);
      

  5.   

    failed to create stream:permission denied int c:\websites\fineartchina470\fineart-china.com\admin\artist_to.php on line 23明显说的就是目前在执行这个脚本的用户在这个目录里面没有权限执行这个函数,可以调整一下权限设置